mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 13:25:10 +00:00
Bow Change
Attempting to Fix Custom Bows
This commit is contained in:
1 parent
a2e869ddb3
commit
79339be79a
3 files changed
+11
-13
No files matched your search
@@ -12,10 +12,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
@@ -272,7 +269,8 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(-var6, -var6, var6);
|
||||
}
|
||||
else if (itemstack2.getItem() == Items.bow)
|
||||
// CHANGE HERE
|
||||
else if (itemstack2.getItem() instanceof ItemBow)
|
||||
{
|
||||
var6 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||
@@ -364,7 +362,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(var6, -var6, var6);
|
||||
}
|
||||
else if (itemstack2.getItem() == Items.bow)
|
||||
else if (itemstack2.getItem() instanceof ItemBow)
|
||||
{
|
||||
var6 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||
|
||||
@@ -17,11 +17,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.model.ModelPony;
|
||||
import noppes.npcs.client.model.ModelPonyArmor;
|
||||
@@ -222,7 +219,8 @@ public class RenderNPCPony extends RenderNPCInterface
|
||||
float f4 = 0.375F * f;
|
||||
GL11.glScalef(f4, -f4, f4);
|
||||
} else
|
||||
if(itemstack.getItem() == Items.bow)
|
||||
// CHANGE HERE
|
||||
if(itemstack.getItem() instanceof ItemBow)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||
GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathNavigate;
|
||||
@@ -1260,8 +1261,9 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
|
||||
@Override
|
||||
public IIcon getItemIcon(ItemStack par1ItemStack, int par2){
|
||||
if (par1ItemStack.getItem() == Items.bow){
|
||||
return Items.bow.getIcon(par1ItemStack, par2);
|
||||
// Change Here
|
||||
if (par1ItemStack.getItem() instanceof ItemBow){
|
||||
return par1ItemStack.getItem().getIcon(par1ItemStack, par2);
|
||||
}
|
||||
EntityPlayer player = CustomNpcs.proxy.getPlayer();
|
||||
if(player == null)
|
||||
|
||||
Reference in new issue
Block a user