diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index bf367f115..812699d9b 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -1085,6 +1085,8 @@ item.gun_fatman.name=M42 Nukleares Katapult "Fat Man" item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV" item.gun_bf.name=M42_2 Nukleares Katapult "Antimaterienwerfer" item.gun_mp40.name=Maschinenpistole +item.gun_uzi.name=IMI Uzi +item.gun_uzi_silencer.name=IMI Uzi mit Schalldämpfer item.gun_uboinik.name=Ubojnik item.gun_lever_action.name=Mare's Leg (Original) item.gun_bolt_action.name=Dream-Repetiergewehr (Original) @@ -1124,6 +1126,7 @@ item.gun_fatman_ammo.name=Miniatombombe item.gun_mirv_ammo.name=Achtfaches MIRV item.gun_bf_ammo.name=Mk.V kompaktes AMAT-Artilleriegeschoss - Typ B.F. item.gun_mp40_ammo.name=SMG-Patrone +item.gun_uzi_ammo.name=.22 lfB Patrone item.gun_uboinik_ammo.name=12x70 Schrotmunition item.gun_lever_action_ammo.name=12x74 Schrotmunition item.gun_bolt_action_ammo.name=12x74 Brenneke @@ -1168,6 +1171,7 @@ item.clip_mirv.name=Kauf-drei-zahl-eins Packung Mini MIRVs item.clip_bf.name=BF-Geschosse im Doppelpack item.clip_mp.name=Magazin des Standardsturmgewehrs des Britannischen Militärs item.clip_mp40.name=9mm SMG-Magazin +item.clip_uzi.name=32 Schuss .22 lfB Magazin item.clip_uboinik.name=12x70 Schrotpatronenbox item.clip_lever_action.name=12x74 Schrotpatronenbox item.clip_bolt_action.name=12x74 Brenneke-Patronenbox diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 6f153739e..976395d71 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -1085,6 +1085,8 @@ item.gun_fatman.name=M42 Nuclear Catapult "Fat Man" item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV" item.gun_bf.name=M42_2 Nuclear Catapult "Antimatter Launcher" item.gun_mp40.name=Submachine Gun +item.gun_uzi.name=IMI Uzi +item.gun_uzi_silencer.name=IMI Uzi with Silencer item.gun_uboinik.name=Uboinik item.gun_lever_action.name=Mare's Leg (Original) item.gun_bolt_action.name=Dream Bolt-Action Rifle (Original) @@ -1124,6 +1126,7 @@ item.gun_fatman_ammo.name=Mini Nuke item.gun_mirv_ammo.name=Eightfold MIRV item.gun_bf_ammo.name=Mk.V Compact AMAT-Artillery Shell - Type B.F. item.gun_mp40_ammo.name=Submachine Gun Round +item.gun_uzi_ammo.name=.22 LR Round item.gun_uboinik_ammo.name=12x70 Buckshot item.gun_lever_action_ammo.name=12x74 Buckshot item.gun_bolt_action_ammo.name=12x74 Slug @@ -1168,6 +1171,7 @@ item.clip_mirv.name=Three-In-One Pack of Mini MIRVs item.clip_bf.name=BF-Shell Double Pack item.clip_mp.name=Britannia Military Standard Issue Assult Rifle Magazine item.clip_mp40.name=9mm SMG Magazine +item.clip_uzi.name=32rnd .22 LR Magazine item.clip_uboinik.name=Box of 12x70 Buckshot Rounds item.clip_lever_action.name=Box of 12x74 Buckshot Rounds item.clip_bolt_action.name=Box of 12x74 Slugs diff --git a/assets/hbm/sounds.json b/assets/hbm/sounds.json index 011740c26..28e775743 100644 --- a/assets/hbm/sounds.json +++ b/assets/hbm/sounds.json @@ -70,6 +70,8 @@ "weapon.ciwsSpinup": {"category": "player", "sounds": [{"name": "weapon/ciwsSpinup", "stream": false}]}, "weapon.ciwsSpindown": {"category": "player", "sounds": [{"name": "weapon/ciwsSpindown", "stream": false}]}, "weapon.laserBang": {"category": "player", "sounds": ["weapon/laserBang1", "weapon/laserBang2", "weapon/laserBang3"]}, + "weapon.uziShoot": {"category": "player", "sounds": [{"name": "weapon/uziShoot", "stream": false}]}, + "weapon.silencerShoot": {"category": "player", "sounds": [{"name": "weapon/silencerShoot", "stream": false}]}, "weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]}, "weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]}, diff --git a/assets/hbm/sounds/weapon/silencerShoot.ogg b/assets/hbm/sounds/weapon/silencerShoot.ogg new file mode 100644 index 000000000..83caf19b9 Binary files /dev/null and b/assets/hbm/sounds/weapon/silencerShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/uziShoot.ogg b/assets/hbm/sounds/weapon/uziShoot.ogg new file mode 100644 index 000000000..de44d99ab Binary files /dev/null and b/assets/hbm/sounds/weapon/uziShoot.ogg differ diff --git a/assets/hbm/textures/items/clip_uzi.png b/assets/hbm/textures/items/clip_uzi.png new file mode 100644 index 000000000..e1d869dc7 Binary files /dev/null and b/assets/hbm/textures/items/clip_uzi.png differ diff --git a/assets/hbm/textures/items/gun_uzi.png b/assets/hbm/textures/items/gun_uzi.png new file mode 100644 index 000000000..b35f0502e Binary files /dev/null and b/assets/hbm/textures/items/gun_uzi.png differ diff --git a/assets/hbm/textures/items/gun_uzi_ammo.png b/assets/hbm/textures/items/gun_uzi_ammo.png new file mode 100644 index 000000000..d6444f096 Binary files /dev/null and b/assets/hbm/textures/items/gun_uzi_ammo.png differ diff --git a/assets/hbm/textures/items/gun_uzi_silencer.png b/assets/hbm/textures/items/gun_uzi_silencer.png new file mode 100644 index 000000000..38a60037f Binary files /dev/null and b/assets/hbm/textures/items/gun_uzi_silencer.png differ diff --git a/assets/hbm/textures/models/ModelUzi.png b/assets/hbm/textures/models/ModelUzi.png new file mode 100644 index 000000000..c288d9495 Binary files /dev/null and b/assets/hbm/textures/models/ModelUzi.png differ diff --git a/assets/hbm/textures/models/ModelUziBarrel.png b/assets/hbm/textures/models/ModelUziBarrel.png new file mode 100644 index 000000000..110ebd5d4 Binary files /dev/null and b/assets/hbm/textures/models/ModelUziBarrel.png differ diff --git a/assets/hbm/textures/models/ModelUziSilencer.png b/assets/hbm/textures/models/ModelUziSilencer.png new file mode 100644 index 000000000..ef102143d Binary files /dev/null and b/assets/hbm/textures/models/ModelUziSilencer.png differ diff --git a/com/hbm/blocks/generic/BlockCrate.java b/com/hbm/blocks/generic/BlockCrate.java index 47b90265a..2d717bcb1 100644 --- a/com/hbm/blocks/generic/BlockCrate.java +++ b/com/hbm/blocks/generic/BlockCrate.java @@ -77,6 +77,7 @@ public class BlockCrate extends BlockFalling { BlockCrate.addToListWithWeight(crateList, ModItems.clip_mirv, 2); BlockCrate.addToListWithWeight(crateList, ModItems.clip_bf, 1); BlockCrate.addToListWithWeight(crateList, ModItems.clip_mp40, 7); + BlockCrate.addToListWithWeight(crateList, ModItems.clip_uzi, 7); BlockCrate.addToListWithWeight(crateList, ModItems.clip_uboinik, 7); BlockCrate.addToListWithWeight(crateList, ModItems.clip_lever_action, 5); BlockCrate.addToListWithWeight(crateList, ModItems.clip_bolt_action, 5); @@ -115,6 +116,8 @@ public class BlockCrate extends BlockFalling { BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mirv, 3); BlockCrate.addToListWithWeight(weaponList, ModItems.gun_bf, 1); BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9); + BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6); + BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5); BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8); BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7); BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action_dark, 6); diff --git a/com/hbm/entity/projectile/EntityBullet.java b/com/hbm/entity/projectile/EntityBullet.java index 735ff1b53..1875acef2 100644 --- a/com/hbm/entity/projectile/EntityBullet.java +++ b/com/hbm/entity/projectile/EntityBullet.java @@ -581,14 +581,11 @@ public class EntityBullet extends Entity implements IProjectile { //this.setDead(); ; } - } else if (!this.getIsCritical()) { - /*this.motionX *= -0.10000000149011612D; - this.motionY *= -0.10000000149011612D; - this.motionZ *= -0.10000000149011612D; - this.rotationYaw += 180.0F; - this.prevRotationYaw += 180.0F; - this.ticksInAir = 0;*/ - //this.setDead(); + } else { + if (movingobjectposition.entityHit instanceof EntityLivingBase) { + EntityLivingBase target = (EntityLivingBase) movingobjectposition.entityHit; + target.setHealth((float) (target.getHealth() - damage)); + } } } else { this.setDead(); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index ebb3d59ab..ad1e146fc 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -726,6 +726,9 @@ public class ModItems { public static Item gun_bf_ammo; public static Item gun_mp40; public static Item gun_mp40_ammo; + public static Item gun_uzi; + public static Item gun_uzi_silencer; + public static Item gun_uzi_ammo; public static Item gun_uboinik; public static Item gun_uboinik_ammo; public static Item gun_lever_action; @@ -1106,6 +1109,7 @@ public class ModItems { public static Item clip_mirv; public static Item clip_bf; public static Item clip_mp40; + public static Item clip_uzi; public static Item clip_uboinik; public static Item clip_lever_action; public static Item clip_bolt_action; @@ -1892,6 +1896,9 @@ public class ModItems { gun_bf = new GunBaleFlare().setMaxDamage(2500).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf"); gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40_ammo"); gun_mp40 = new GunSMG().setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40"); + gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_ammo"); + gun_uzi = new GunUZI().setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi"); + gun_uzi_silencer = new GunUZI().setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer"); gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo"); gun_uboinik = new GunShotgun().setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik"); gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo"); @@ -2130,6 +2137,7 @@ public class ModItems { clip_mirv = new ItemClip().setUnlocalizedName("clip_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mirv"); clip_bf = new ItemClip().setUnlocalizedName("clip_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":clip_bf"); clip_mp40 = new ItemClip().setUnlocalizedName("clip_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mp40"); + clip_uzi = new ItemClip().setUnlocalizedName("clip_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uzi"); clip_uboinik = new ItemClip().setUnlocalizedName("clip_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uboinik"); clip_lever_action = new ItemClip().setUnlocalizedName("clip_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_lever_action"); clip_bolt_action = new ItemClip().setUnlocalizedName("clip_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_bolt_action"); @@ -3220,6 +3228,8 @@ public class ModItems { GameRegistry.registerItem(gun_mirv, gun_mirv.getUnlocalizedName()); GameRegistry.registerItem(gun_bf, gun_bf.getUnlocalizedName()); GameRegistry.registerItem(gun_mp40, gun_mp40.getUnlocalizedName()); + GameRegistry.registerItem(gun_uzi, gun_uzi.getUnlocalizedName()); + GameRegistry.registerItem(gun_uzi_silencer,gun_uzi_silencer.getUnlocalizedName()); GameRegistry.registerItem(gun_uboinik, gun_uboinik.getUnlocalizedName()); GameRegistry.registerItem(gun_lever_action, gun_lever_action.getUnlocalizedName()); GameRegistry.registerItem(gun_lever_action_dark, gun_lever_action_dark.getUnlocalizedName()); @@ -3263,6 +3273,7 @@ public class ModItems { GameRegistry.registerItem(gun_mirv_ammo, gun_mirv_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_bf_ammo, gun_bf_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_mp40_ammo, gun_mp40_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_uzi_ammo, gun_uzi_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_uboinik_ammo, gun_uboinik_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_lever_action_ammo, gun_lever_action_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_bolt_action_ammo, gun_bolt_action_ammo.getUnlocalizedName()); @@ -3305,6 +3316,7 @@ public class ModItems { GameRegistry.registerItem(clip_mirv, clip_mirv.getUnlocalizedName()); GameRegistry.registerItem(clip_bf, clip_bf.getUnlocalizedName()); GameRegistry.registerItem(clip_mp40, clip_mp40.getUnlocalizedName()); + GameRegistry.registerItem(clip_uzi, clip_uzi.getUnlocalizedName()); GameRegistry.registerItem(clip_uboinik, clip_uboinik.getUnlocalizedName()); GameRegistry.registerItem(clip_lever_action, clip_lever_action.getUnlocalizedName()); GameRegistry.registerItem(clip_bolt_action, clip_bolt_action.getUnlocalizedName()); diff --git a/com/hbm/items/weapon/GunUZI.java b/com/hbm/items/weapon/GunUZI.java new file mode 100644 index 000000000..56a893447 --- /dev/null +++ b/com/hbm/items/weapon/GunUZI.java @@ -0,0 +1,101 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.google.common.collect.Multimap; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.items.ModItems; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunUZI extends Item { + + Random rand = new Random(); + + public GunUZI() + { + this.maxStackSize = 1; + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + @Override + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) + { + World world = player.worldObj; + + boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + + if (player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_uzi_ammo)) { + + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 2, 4, false, false); + entityarrow.setDamage(2 + rand.nextInt(3)); + + if(this == ModItems.gun_uzi) + world.playSoundAtEntity(player, "hbm:weapon.uziShoot", 10.0F, 1.0F); + if(this == ModItems.gun_uzi_silencer) + world.playSoundAtEntity(player, "hbm:weapon.silencerShoot", 0.15F, 1.0F); + + if (!flag) { + player.inventory.consumeInventoryItem(ModItems.gun_uzi_ammo); + } + + if (!world.isRemote) { + world.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + if(this == ModItems.gun_uzi) + list.add("[very intense pewpew-ing]"); + if(this == ModItems.gun_uzi_silencer) + list.add("Mom, where are my mittens?"); + list.add(""); + list.add("Ammo: .22 LR Round"); + list.add("Damage: 2 - 4"); + } + + @Override + public Multimap getItemAttributeModifiers() { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(field_111210_e, "Weapon modifier", 2.5D, 0)); + return multimap; + } +} diff --git a/com/hbm/items/weapon/ItemClip.java b/com/hbm/items/weapon/ItemClip.java index 0307a67a5..77f93b489 100644 --- a/com/hbm/items/weapon/ItemClip.java +++ b/com/hbm/items/weapon/ItemClip.java @@ -122,6 +122,14 @@ public class ItemClip extends Item { } } + if(this == ModItems.clip_uzi) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_uzi_ammo, 32))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_uzi_ammo, 32), false); + } + } + if(this == ModItems.clip_uboinik) { if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_uboinik_ammo, 24))) diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 8f2b8fc5f..ef9f8511b 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -202,6 +202,8 @@ public class ClientProxy extends ServerProxy MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action_sonata, new ItemRenderGunAnim()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_b92, new ItemRenderGunAnim()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_b93, new ItemRenderGunAnim()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi, new ItemRenderUZI()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_silencer, new ItemRenderUZI()); MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool()); MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool()); diff --git a/com/hbm/render/item/ItemRenderUZI.java b/com/hbm/render/item/ItemRenderUZI.java new file mode 100644 index 000000000..605caf732 --- /dev/null +++ b/com/hbm/render/item/ItemRenderUZI.java @@ -0,0 +1,103 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMP40; +import com.hbm.render.model.ModelUzi; +import com.hbm.render.model.ModelUziBarrel; +import com.hbm.render.model.ModelUziSilencer; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderUZI implements IItemRenderer { + + protected ModelUzi uzi; + protected ModelUziBarrel barrel; + protected ModelUziSilencer silencer; + + public ItemRenderUZI() { + uzi = new ModelUzi(); + barrel = new ModelUziBarrel(); + silencer = new ModelUziSilencer(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F); + GL11.glScalef(0.25F, 0.25F, 0.25F); + GL11.glTranslatef(-2.2F, -0.2F, -0.9F); + + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUzi.png")); + uzi.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + + if(item.getItem() == ModItems.gun_uzi) { + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziBarrel.png")); + barrel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + } + + if(item.getItem() == ModItems.gun_uzi_silencer) { + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSilencer.png")); + silencer.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + } + + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F); + + GL11.glScalef(0.5F, 0.5F, 0.5F); + + GL11.glTranslatef(0.2F, -0.8F, -1.0F); + + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUzi.png")); + uzi.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + + if(item.getItem() == ModItems.gun_uzi) { + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziBarrel.png")); + barrel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + } + + if(item.getItem() == ModItems.gun_uzi_silencer) { + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSilencer.png")); + silencer.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + } + + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/model/ModelUzi.java b/com/hbm/render/model/ModelUzi.java new file mode 100644 index 000000000..473dd6fe1 --- /dev/null +++ b/com/hbm/render/model/ModelUzi.java @@ -0,0 +1,420 @@ +// Date: 22.07.2018 14:18:53 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelUzi extends ModelBase { + // fields + ModelRenderer BodyBack; + ModelRenderer BodyBottom; + ModelRenderer BodySide; + ModelRenderer Ejector; + ModelRenderer BodyFront; + ModelRenderer GripFront; + ModelRenderer StockFront; + ModelRenderer StockPlate; + ModelRenderer HandleBase; + ModelRenderer Handle; + ModelRenderer HandleBack; + ModelRenderer HandleBottom; + ModelRenderer HandlePlate; + ModelRenderer HandleTop; + ModelRenderer Muzzle1; + ModelRenderer Muzzle2; + ModelRenderer StockBack; + ModelRenderer StockPlate1; + ModelRenderer Stock1; + ModelRenderer Stock2; + ModelRenderer Stcok3; + ModelRenderer Stock4; + ModelRenderer Hump1; + ModelRenderer Hump2; + ModelRenderer Hump3; + ModelRenderer Hump4; + ModelRenderer Hump5; + ModelRenderer Hump6; + ModelRenderer SightBack; + ModelRenderer Sight1; + ModelRenderer Sight2; + ModelRenderer Hump7; + ModelRenderer Hump8; + ModelRenderer Hump9; + ModelRenderer Hump10; + ModelRenderer Hump11; + ModelRenderer Hump12; + ModelRenderer Sight3; + ModelRenderer SightFront; + ModelRenderer Knob1; + ModelRenderer Knob2; + ModelRenderer Bolt1; + ModelRenderer Bolt2; + ModelRenderer Mag; + ModelRenderer Trigger; + ModelRenderer Frame1; + ModelRenderer Frame2; + + public ModelUzi() { + textureWidth = 128; + textureHeight = 64; + + BodyBack = new ModelRenderer(this, 0, 0); + BodyBack.addBox(0F, 0F, 0F, 14, 6, 4); + BodyBack.setRotationPoint(0F, 0F, 0F); + BodyBack.setTextureSize(128, 64); + BodyBack.mirror = true; + setRotation(BodyBack, 0F, 0F, 0F); + BodyBottom = new ModelRenderer(this, 82, 0); + BodyBottom.addBox(0F, 0F, 0F, 6, 3, 4); + BodyBottom.setRotationPoint(-6F, 3F, 0F); + BodyBottom.setTextureSize(128, 64); + BodyBottom.mirror = true; + setRotation(BodyBottom, 0F, 0F, 0F); + BodySide = new ModelRenderer(this, 102, 0); + BodySide.addBox(0F, 0F, 0F, 6, 3, 2); + BodySide.setRotationPoint(-6F, 0F, 0F); + BodySide.setTextureSize(128, 64); + BodySide.mirror = true; + setRotation(BodySide, 0F, 0F, 0F); + Ejector = new ModelRenderer(this, 102, 5); + Ejector.addBox(0F, 0F, 0F, 6, 3, 2); + Ejector.setRotationPoint(-6F, 0.5F, 1.5F); + Ejector.setTextureSize(128, 64); + Ejector.mirror = true; + setRotation(Ejector, 0F, 0F, 0F); + BodyFront = new ModelRenderer(this, 36, 0); + BodyFront.addBox(0F, 0F, 0F, 19, 6, 4); + BodyFront.setRotationPoint(-25F, 0F, 0F); + BodyFront.setTextureSize(128, 64); + BodyFront.mirror = true; + setRotation(BodyFront, 0F, 0F, 0F); + GripFront = new ModelRenderer(this, 0, 10); + GripFront.addBox(0F, 0F, 0F, 14, 5, 5); + GripFront.setRotationPoint(-24.5F, 1.5F, -0.5F); + GripFront.setTextureSize(128, 64); + GripFront.mirror = true; + setRotation(GripFront, 0F, 0F, 0F); + StockFront = new ModelRenderer(this, 38, 10); + StockFront.addBox(0F, 0F, 0F, 14, 3, 4); + StockFront.setRotationPoint(3F, 6F, 0F); + StockFront.setTextureSize(128, 64); + StockFront.mirror = true; + setRotation(StockFront, 0F, 0F, 0F); + StockPlate = new ModelRenderer(this, 118, 0); + StockPlate.addBox(0F, -4F, 0F, 1, 4, 4); + StockPlate.setRotationPoint(3F, 9F, 0F); + StockPlate.setTextureSize(128, 64); + StockPlate.mirror = true; + setRotation(StockPlate, 0F, 0F, -0.3490659F); + HandleBase = new ModelRenderer(this, 0, 20); + HandleBase.addBox(0F, 0F, 0F, 12, 3, 5); + HandleBase.setRotationPoint(-10F, 4F, -0.5F); + HandleBase.setTextureSize(128, 64); + HandleBase.mirror = true; + setRotation(HandleBase, 0F, 0F, 0F); + Handle = new ModelRenderer(this, 0, 28); + Handle.addBox(0F, 0F, 0F, 4, 10, 3); + Handle.setRotationPoint(-5F, 7F, 0.5F); + Handle.setTextureSize(128, 64); + Handle.mirror = true; + setRotation(Handle, 0F, 0F, 0F); + HandleBack = new ModelRenderer(this, 14, 28); + HandleBack.addBox(0F, 0F, 0F, 2, 4, 3); + HandleBack.setRotationPoint(-1F, 11F, 0.5F); + HandleBack.setTextureSize(128, 64); + HandleBack.mirror = true; + setRotation(HandleBack, 0F, 0F, 0F); + HandleBottom = new ModelRenderer(this, 14, 35); + HandleBottom.addBox(-2F, 0F, 0F, 2, 3, 3); + HandleBottom.setRotationPoint(1F, 15F, 0.5F); + HandleBottom.setTextureSize(128, 64); + HandleBottom.mirror = true; + setRotation(HandleBottom, 0F, 0F, 0.7853982F); + HandlePlate = new ModelRenderer(this, 24, 28); + HandlePlate.addBox(-2F, -3F, 0F, 2, 3, 3); + HandlePlate.setRotationPoint(1F, 11F, 0.5F); + HandlePlate.setTextureSize(128, 64); + HandlePlate.mirror = true; + setRotation(HandlePlate, 0F, 0F, -0.4886922F); + HandleTop = new ModelRenderer(this, 24, 34); + HandleTop.addBox(-2F, 0F, 0F, 2, 3, 3); + HandleTop.setRotationPoint(1F, 7F, 0.5F); + HandleTop.setTextureSize(128, 64); + HandleTop.mirror = true; + setRotation(HandleTop, 0F, 0F, 0.5235988F); + Muzzle1 = new ModelRenderer(this, 82, 12); + Muzzle1.addBox(0F, 0F, 0F, 3, 3, 2); + Muzzle1.setRotationPoint(-28F, 1.5F, 1F); + Muzzle1.setTextureSize(128, 64); + Muzzle1.mirror = true; + setRotation(Muzzle1, 0F, 0F, 0F); + Muzzle2 = new ModelRenderer(this, 82, 7); + Muzzle2.addBox(0F, 0F, 0F, 3, 2, 3); + Muzzle2.setRotationPoint(-28F, 2F, 0.5F); + Muzzle2.setTextureSize(128, 64); + Muzzle2.mirror = true; + setRotation(Muzzle2, 0F, 0F, 0F); + StockBack = new ModelRenderer(this, 34, 20); + StockBack.addBox(0F, 0F, 0F, 1, 11, 3); + StockBack.setRotationPoint(14F, 7F, 0.5F); + StockBack.setTextureSize(128, 64); + StockBack.mirror = true; + setRotation(StockBack, 0F, 0F, 0F); + StockPlate1 = new ModelRenderer(this, 42, 17); + StockPlate1.addBox(-1F, -11F, 0F, 1, 11, 3); + StockPlate1.setRotationPoint(15F, 18F, 0.5F); + StockPlate1.setTextureSize(128, 64); + StockPlate1.mirror = true; + setRotation(StockPlate1, 0F, 0F, 0.0959931F); + Stock1 = new ModelRenderer(this, 50, 17); + Stock1.addBox(-1F, -3F, 0F, 1, 3, 4); + Stock1.setRotationPoint(17F, 6F, 0F); + Stock1.setTextureSize(128, 64); + Stock1.mirror = true; + setRotation(Stock1, 0F, 0F, -0.3490659F); + Stock2 = new ModelRenderer(this, 60, 17); + Stock2.addBox(0F, -3F, 0F, 1, 3, 4); + Stock2.setRotationPoint(14F, 6F, 0F); + Stock2.setTextureSize(128, 64); + Stock2.mirror = true; + setRotation(Stock2, 0F, 0F, 0.3490659F); + Stcok3 = new ModelRenderer(this, 50, 24); + Stcok3.addBox(0F, 0F, 0F, 1, 3, 4); + Stcok3.setRotationPoint(15F, 3F, 0F); + Stcok3.setTextureSize(128, 64); + Stcok3.mirror = true; + setRotation(Stcok3, 0F, 0F, 0F); + Stock4 = new ModelRenderer(this, 60, 24); + Stock4.addBox(0F, 0F, 0F, 2, 5, 3); + Stock4.setRotationPoint(13.5F, 1.5F, 0.5F); + Stock4.setTextureSize(128, 64); + Stock4.mirror = true; + setRotation(Stock4, 0F, 0F, 0F); + Hump1 = new ModelRenderer(this, 74, 10); + Hump1.addBox(-2F, -3F, 0F, 2, 3, 1); + Hump1.setRotationPoint(14F, 0F, 0F); + Hump1.setTextureSize(128, 64); + Hump1.mirror = true; + setRotation(Hump1, 0F, 0F, -0.2617994F); + Hump2 = new ModelRenderer(this, 74, 14); + Hump2.addBox(0F, -3F, 0F, 2, 3, 1); + Hump2.setRotationPoint(10F, 0F, 0F); + Hump2.setTextureSize(128, 64); + Hump2.mirror = true; + setRotation(Hump2, 0F, 0F, 0.2617994F); + Hump3 = new ModelRenderer(this, 74, 18); + Hump3.addBox(0F, 0F, 0F, 2, 1, 1); + Hump3.setRotationPoint(11F, -3F, 0F); + Hump3.setTextureSize(128, 64); + Hump3.mirror = true; + setRotation(Hump3, 0F, 0F, 0F); + Hump4 = new ModelRenderer(this, 70, 20); + Hump4.addBox(-2F, -3F, 0F, 2, 3, 1); + Hump4.setRotationPoint(14F, 0F, 3F); + Hump4.setTextureSize(128, 64); + Hump4.mirror = true; + setRotation(Hump4, 0F, 0F, -0.2617994F); + Hump5 = new ModelRenderer(this, 70, 24); + Hump5.addBox(0F, -3F, 0F, 2, 3, 1); + Hump5.setRotationPoint(10F, 0F, 3F); + Hump5.setTextureSize(128, 64); + Hump5.mirror = true; + setRotation(Hump5, 0F, 0F, 0.2617994F); + Hump6 = new ModelRenderer(this, 70, 28); + Hump6.addBox(0F, 0F, 0F, 2, 1, 1); + Hump6.setRotationPoint(11F, -3F, 3F); + Hump6.setTextureSize(128, 64); + Hump6.mirror = true; + setRotation(Hump6, 0F, 0F, 0F); + SightBack = new ModelRenderer(this, 80, 17); + SightBack.addBox(0F, 0F, 0F, 1, 1, 1); + SightBack.setRotationPoint(11.5F, -2F, 1.5F); + SightBack.setTextureSize(128, 64); + SightBack.mirror = true; + setRotation(SightBack, 0F, 0F, 0F); + Sight1 = new ModelRenderer(this, 80, 19); + Sight1.addBox(0F, 0F, 0F, 1, 1, 1); + Sight1.setRotationPoint(11.5F, -1F, 1.5F); + Sight1.setTextureSize(128, 64); + Sight1.mirror = true; + setRotation(Sight1, 0F, 0F, 0F); + Sight2 = new ModelRenderer(this, 84, 17); + Sight2.addBox(0F, 0F, 0F, 2, 1, 2); + Sight2.setRotationPoint(11F, -0.5F, 1F); + Sight2.setTextureSize(128, 64); + Sight2.mirror = true; + setRotation(Sight2, 0F, 0F, 0F); + Hump7 = new ModelRenderer(this, 94, 7); + Hump7.addBox(-2F, -3F, 0F, 2, 3, 1); + Hump7.setRotationPoint(-21F, 0F, 0F); + Hump7.setTextureSize(128, 64); + Hump7.mirror = true; + setRotation(Hump7, 0F, 0F, -0.2617994F); + Hump8 = new ModelRenderer(this, 94, 11); + Hump8.addBox(0F, -3F, 0F, 2, 3, 1); + Hump8.setRotationPoint(-25F, 0F, 0F); + Hump8.setTextureSize(128, 64); + Hump8.mirror = true; + setRotation(Hump8, 0F, 0F, 0.2617994F); + Hump9 = new ModelRenderer(this, 94, 15); + Hump9.addBox(0F, 0F, 0F, 2, 1, 1); + Hump9.setRotationPoint(-24F, -3F, 0F); + Hump9.setTextureSize(128, 64); + Hump9.mirror = true; + setRotation(Hump9, 0F, 0F, 0F); + Hump10 = new ModelRenderer(this, 100, 10); + Hump10.addBox(-2F, -3F, 0F, 2, 3, 1); + Hump10.setRotationPoint(-21F, 0F, 3F); + Hump10.setTextureSize(128, 64); + Hump10.mirror = true; + setRotation(Hump10, 0F, 0F, -0.2617994F); + Hump11 = new ModelRenderer(this, 100, 14); + Hump11.addBox(0F, -3F, 0F, 2, 3, 1); + Hump11.setRotationPoint(-25F, 0F, 3F); + Hump11.setTextureSize(128, 64); + Hump11.mirror = true; + setRotation(Hump11, 0F, 0F, 0.2617994F); + Hump12 = new ModelRenderer(this, 100, 18); + Hump12.addBox(0F, 0F, 0F, 2, 1, 1); + Hump12.setRotationPoint(-24F, -3F, 3F); + Hump12.setTextureSize(128, 64); + Hump12.mirror = true; + setRotation(Hump12, 0F, 0F, 0F); + Sight3 = new ModelRenderer(this, 34, 34); + Sight3.addBox(0F, 0F, 0F, 2, 1, 2); + Sight3.setRotationPoint(-24F, -0.5F, 1F); + Sight3.setTextureSize(128, 64); + Sight3.mirror = true; + setRotation(Sight3, 0F, 0F, 0F); + SightFront = new ModelRenderer(this, 34, 37); + SightFront.addBox(0F, 0F, 0F, 1, 2, 0); + SightFront.setRotationPoint(-23.5F, -1.5F, 2F); + SightFront.setTextureSize(128, 64); + SightFront.mirror = true; + setRotation(SightFront, 0F, 0F, 0F); + Knob1 = new ModelRenderer(this, 42, 31); + Knob1.addBox(0F, 0F, 0F, 2, 2, 2); + Knob1.setRotationPoint(-15F, -2F, 1F); + Knob1.setTextureSize(128, 64); + Knob1.mirror = true; + setRotation(Knob1, 0F, 0F, 0F); + Knob2 = new ModelRenderer(this, 50, 31); + Knob2.addBox(-1F, 0F, -1F, 2, 2, 2); + Knob2.setRotationPoint(-14F, -2F, 2F); + Knob2.setTextureSize(128, 64); + Knob2.mirror = true; + setRotation(Knob2, 0F, 0.7853982F, 0F); + Bolt1 = new ModelRenderer(this, 42, 35); + Bolt1.addBox(0F, 0F, 0F, 1, 1, 1); + Bolt1.setRotationPoint(11.5F, -2F, -0.5F); + Bolt1.setTextureSize(128, 64); + Bolt1.mirror = true; + setRotation(Bolt1, 0F, 0F, 0F); + Bolt2 = new ModelRenderer(this, 46, 35); + Bolt2.addBox(0F, 0F, 0F, 1, 1, 1); + Bolt2.setRotationPoint(11.5F, -2F, 3.5F); + Bolt2.setTextureSize(128, 64); + Bolt2.mirror = true; + setRotation(Bolt2, 0F, 0F, 0F); + Mag = new ModelRenderer(this, 118, 8); + Mag.addBox(0F, 0F, 0F, 3, 10, 2); + Mag.setRotationPoint(-4.5F, 17F, 1F); + Mag.setTextureSize(128, 64); + Mag.mirror = true; + setRotation(Mag, 0F, 0F, 0F); + Trigger = new ModelRenderer(this, 0, 41); + Trigger.addBox(-1F, 0F, 0F, 1, 3, 1); + Trigger.setRotationPoint(-6F, 7F, 1.5F); + Trigger.setTextureSize(128, 64); + Trigger.mirror = true; + setRotation(Trigger, 0F, 0F, 0.3490659F); + Frame1 = new ModelRenderer(this, 4, 41); + Frame1.addBox(0F, 0F, 0F, 3, 4, 2); + Frame1.setRotationPoint(-10F, 7F, 1F); + Frame1.setTextureSize(128, 64); + Frame1.mirror = true; + setRotation(Frame1, 0F, 0F, 0F); + Frame2 = new ModelRenderer(this, 14, 41); + Frame2.addBox(0F, -1F, 0F, 3, 1, 2); + Frame2.setRotationPoint(-7F, 11F, 1F); + Frame2.setTextureSize(128, 64); + Frame2.mirror = true; + setRotation(Frame2, 0F, 0F, -0.4363323F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + GL11.glDisable(GL11.GL_CULL_FACE); + BodyBack.render(f5); + BodyBottom.render(f5); + BodySide.render(f5); + Ejector.render(f5); + BodyFront.render(f5); + GripFront.render(f5); + StockFront.render(f5); + StockPlate.render(f5); + HandleBase.render(f5); + Handle.render(f5); + HandleBack.render(f5); + HandleBottom.render(f5); + HandlePlate.render(f5); + HandleTop.render(f5); + Muzzle1.render(f5); + Muzzle2.render(f5); + StockBack.render(f5); + StockPlate1.render(f5); + Stock1.render(f5); + Stock2.render(f5); + Stcok3.render(f5); + Stock4.render(f5); + Hump1.render(f5); + Hump2.render(f5); + Hump3.render(f5); + Hump4.render(f5); + Hump5.render(f5); + Hump6.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + SightBack.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Sight1.render(f5); + Sight2.render(f5); + Hump7.render(f5); + Hump8.render(f5); + Hump9.render(f5); + Hump10.render(f5); + Hump11.render(f5); + Hump12.render(f5); + Sight3.render(f5); + SightFront.render(f5); + Knob1.render(f5); + Knob2.render(f5); + Bolt1.render(f5); + Bolt2.render(f5); + Mag.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Trigger.render(f5); + Frame1.render(f5); + Frame2.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelUziBarrel.java b/com/hbm/render/model/ModelUziBarrel.java new file mode 100644 index 000000000..c699eb13d --- /dev/null +++ b/com/hbm/render/model/ModelUziBarrel.java @@ -0,0 +1,45 @@ +// Date: 22.07.2018 14:26:58 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelUziBarrel extends ModelBase { + // fields + ModelRenderer Barrel; + + public ModelUziBarrel() { + textureWidth = 32; + textureHeight = 32; + + Barrel = new ModelRenderer(this, 0, 0); + Barrel.addBox(0F, 0F, 0F, 12, 2, 2); + Barrel.setRotationPoint(-40F, 2F, 1F); + Barrel.setTextureSize(32, 32); + Barrel.mirror = true; + setRotation(Barrel, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Barrel.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelUziSilencer.java b/com/hbm/render/model/ModelUziSilencer.java new file mode 100644 index 000000000..5066db4c4 --- /dev/null +++ b/com/hbm/render/model/ModelUziSilencer.java @@ -0,0 +1,61 @@ +// Date: 22.07.2018 14:32:28 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelUziSilencer extends ModelBase { + // fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + + public ModelUziSilencer() { + textureWidth = 128; + textureHeight = 32; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(0F, 0F, 0F, 32, 5, 3); + Shape1.setRotationPoint(-60F, 0.5F, 0.5F); + Shape1.setTextureSize(128, 32); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 8); + Shape2.addBox(0F, 0F, 0F, 32, 3, 5); + Shape2.setRotationPoint(-60F, 1.5F, -0.5F); + Shape2.setTextureSize(128, 32); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 16); + Shape3.addBox(0F, 0F, 0F, 32, 4, 4); + Shape3.setRotationPoint(-60F, 1F, 0F); + Shape3.setTextureSize(128, 32); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape1.render(f5); + Shape2.render(f5); + Shape3.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +}