Skip to content

Commit

Permalink
init on first call
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis committed May 19, 2024
1 parent 181457d commit 85254e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/emt/item/armor/wings/ItemFeatherWing.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
public class ItemFeatherWing extends ItemArmor implements IRunicArmor {

public int visDiscount = 0;
@SideOnly(Side.CLIENT)
private static final ModelWings MODEL_WINGS = new ModelWings();

private static ModelWings MODEL_WINGS = null;

public ItemFeatherWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
Expand Down Expand Up @@ -53,6 +53,8 @@ public String getArmorTexture(ItemStack stack, Entity entity, int slot, String t
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
if (MODEL_WINGS == null) MODEL_WINGS = new ModelWings();

if (entity instanceof EntityPlayer && stack != null
&& stack.stackTagCompound != null
&& stack.stackTagCompound.hasKey("isJumping")) {
Expand Down

0 comments on commit 85254e4

Please sign in to comment.