Compare commits

..
2 Commits
Author SHA1 Message Date
KAMKEEL 69877e8edf 1.2.2
Bow Fix
2021-09-24 17:00:41 -04:00
KAMKEEL 79339be79a Bow Change
Attempting to Fix Custom Bows
2021-09-24 16:50:28 -04:00
5 changed files with 13 additions and 15 deletions

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge'
version = "1.2.1"
version = "1.2.2"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "CustomNPC-Plus"
+1 -1
View File
@@ -60,7 +60,7 @@ import noppes.npcs.entity.old.EntityNpcNagaFemale;
import noppes.npcs.entity.old.EntityNpcNagaMale;
import noppes.npcs.entity.old.EntityNpcSkeleton;
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.2.1")
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.2.2")
public class CustomNpcs {
@ConfigProp(info = "Disable Chat Bubbles")
@@ -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)