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;
}
CustomBlockTexture.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:SuperiorCraft
作者:
评论列表
文章目录