Fix wings rendering

This commit is contained in:
abel1502 2024-11-02 23:29:35 +03:00
parent d39c66ded4
commit b58ab4520b
No known key found for this signature in database
GPG Key ID: 076926596A536338
2 changed files with 17 additions and 8 deletions

View File

@ -6,7 +6,6 @@ import com.hbm.handler.ArmorModHandler;
import com.hbm.render.model.ModelJetPack;
import com.hbm.util.ArmorUtil;
import api.hbm.fluid.IFillableItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;

View File

@ -1,16 +1,16 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.extprop.HbmPlayerProps;
import com.hbm.handler.ArmorModHandler;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.render.model.ModelArmorWings;
import com.hbm.util.ArmorUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -23,14 +23,24 @@ public class WingsMurk extends JetpackBase {
super();
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
MainRegistry.logger.info("[ABEL] Wings texture: " + ResourceManager.wings_murk.toString());
return ResourceManager.wings_murk.toString();
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if(cachedModel == null) {
cachedModel = new ModelArmorWings(this == ModItems.wings_murk ? 0 : 1);
if (armorSlot == 1) {
if(cachedModel == null) {
cachedModel = new ModelArmorWings(this == ModItems.wings_murk ? 0 : 1);
}
return cachedModel;
}
return cachedModel;
return null;
}
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {