CustomBlockTexture.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:SuperiorCraft 作者:
public static CustomBlockTexture extractTextureFromEntity(ArmorStand e) {
    CustomBlockTexture t = new CustomBlockTexture();
    short tex = (short) e.getHelmet().getDurability();
    Color c = ((LeatherArmorMeta) e.getHelmet().getItemMeta()).getColor();
    boolean g = e.getHelmet().containsEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL);
    t.setLayerPrimary(tex, c, g);

    if (e.getEquipment().getItemInMainHand() == null) {
        return t;
    }

    short tex2 = (short) e.getEquipment().getItemInMainHand().getDurability();
    Color c2 = ((LeatherArmorMeta) e.getEquipment().getItemInMainHand().getItemMeta()).getColor();
    boolean g2 = e.getEquipment().getItemInMainHand().containsEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL);
    t.setLayerSecondary(tex2, c2, g2);

    return t;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号