diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 9ac586f77..f9493992f 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -9,6 +9,7 @@ death.attack.mudPoisoning=%1$s starb an Giftschlamm. death.attack.euthanized=%1$s wurde von %2$s eingeschläfert. death.attack.euthanizedSelf=%1$s hat sich selbst eingeschläfert, was für ein Vollpfosten. death.attack.euthanizedSelf2=%1$s gewinnt den Darwin Award. +death.attack.tau=%1$s wurde von %2$s mit negativ geladenen Tauonen durchsiebt. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 41d714dc9..c06ce1ad5 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -9,6 +9,7 @@ death.attack.mudPoisoning=%1$s died in poisonous mud. death.attack.euthanized=%1$s was euthanized by %2$s. death.attack.euthanizedSelf=%1$s euthanized himself, what a dork. death.attack.euthanizedSelf2=%1$s wins the Darwin Award. +death.attack.tau=%1$s was riddeled by %2$s using negatively charged tauons. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword diff --git a/assets/hbm/textures/models/ModelXVL1456.png b/assets/hbm/textures/models/ModelXVL1456.png new file mode 100644 index 000000000..fd3f90d76 Binary files /dev/null and b/assets/hbm/textures/models/ModelXVL1456.png differ diff --git a/com/hbm/entity/EntityBullet.java b/com/hbm/entity/EntityBullet.java index 08b2cead0..9a887e286 100644 --- a/com/hbm/entity/EntityBullet.java +++ b/com/hbm/entity/EntityBullet.java @@ -48,12 +48,13 @@ public class EntityBullet extends Entity implements IProjectile public Entity shootingEntity; private int ticksInGround; private int ticksInAir; - private double damage = 2.0D; + public double damage; /** The amount of knockback an arrow applies when it hits a mob. */ private int knockbackStrength; private static final String __OBFID = "CL_00001715"; private int dmgMin = 0; private int dmgMax = 1; + private boolean isTau = false; private boolean instakill = false; @@ -131,6 +132,32 @@ public class EntityBullet extends Entity implements IProjectile this.instakill = instakill; } + public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, boolean instakill, String isTau) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + this.setTau(isTau == "tauDay"); + this.setIsCritical(true); + } + public EntityBullet(World world, int x, int y, int z, double mx, double my, double mz, double grav) { super(world); this.posX = x + 0.5F; @@ -148,6 +175,7 @@ public class EntityBullet extends Entity implements IProjectile protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + this.dataWatcher.addObject(17, Byte.valueOf((byte)0)); } /** @@ -228,12 +256,12 @@ public class EntityBullet extends Entity implements IProjectile Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); - if (block.getMaterial() != Material.air && !(block instanceof DecoBlockAlt)) + if (block.getMaterial() != Material.air) { block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)) && !this.getIsCritical()) { this.inGround = true; } @@ -255,7 +283,7 @@ public class EntityBullet extends Entity implements IProjectile --this.arrowShake; } - if (this.inGround) + if (this.inGround && !this.getIsCritical()) { this.setDead(); } @@ -334,14 +362,19 @@ public class EntityBullet extends Entity implements IProjectile DamageSource damagesource = null; - if (this.shootingEntity == null) - { - damagesource = ModDamageSource.causeBulletDamage(this, this); - } - else - { - damagesource = ModDamageSource.causeBulletDamage(this, shootingEntity); - } + if (!this.getIsCritical()) { + if (this.shootingEntity == null) { + damagesource = ModDamageSource.causeBulletDamage(this, this); + } else { + damagesource = ModDamageSource.causeBulletDamage(this, shootingEntity); + } + } else { + if (this.shootingEntity == null) { + damagesource = ModDamageSource.causeTauDamage(this, this); + } else { + damagesource = ModDamageSource.causeTauDamage(this, shootingEntity); + } + } if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) { @@ -354,11 +387,6 @@ public class EntityBullet extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - //entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); @@ -393,10 +421,11 @@ public class EntityBullet extends Entity implements IProjectile ((EntityLivingBase)movingobjectposition.entityHit).setHealth(0.0F); } } - this.setDead(); + if(!this.getIsCritical()) + this.setDead(); } } - else + else if(!this.getIsCritical()) { this.motionX *= -0.10000000149011612D; this.motionY *= -0.10000000149011612D; @@ -406,7 +435,7 @@ public class EntityBullet extends Entity implements IProjectile this.ticksInAir = 0; } } - else + else if(!this.getIsCritical()) { this.field_145791_d = movingobjectposition.blockX; this.field_145792_e = movingobjectposition.blockY; @@ -422,7 +451,6 @@ public class EntityBullet extends Entity implements IProjectile this.posZ -= this.motionZ / f2 * 0.05000000074505806D; this.inGround = true; this.arrowShake = 7; - this.setIsCritical(false); if (this.field_145790_g.getMaterial() != Material.air) { @@ -431,6 +459,17 @@ public class EntityBullet extends Entity implements IProjectile } } + if (this.getIsCritical()) + { + for (i = 0; i < 8; ++i) + { + if(!this.getIsTau()) + this.worldObj.spawnParticle("fireworksSpark", this.posX + this.motionX * (double)i / 8.0D, this.posY + this.motionY * (double)i / 8.0D, this.posZ + this.motionZ * (double)i / 8.0D, 0, 0, 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); + else + this.worldObj.spawnParticle("reddust", this.posX + this.motionX * (double)i / 8.0D, this.posY + this.motionY * (double)i / 8.0D, this.posZ + this.motionZ * (double)i / 8.0D, 0, 0, 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); + } + } + this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; @@ -485,6 +524,9 @@ public class EntityBullet extends Entity implements IProjectile this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } + + if(this.ticksExisted > 250) + this.setDead(); } /** @@ -618,6 +660,19 @@ public class EntityBullet extends Entity implements IProjectile this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); } } + public void setTau(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(17); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(17, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(17, Byte.valueOf((byte)(b0 & -2))); + } + } /** * Whether the arrow has a stream of critical hit particles flying behind it. @@ -627,4 +682,10 @@ public class EntityBullet extends Entity implements IProjectile byte b0 = this.dataWatcher.getWatchableObjectByte(16); return (b0 & 1) != 0; } + + public boolean getIsTau() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(17); + return (b0 & 1) != 0; + } } diff --git a/com/hbm/items/GunRevolver.java b/com/hbm/items/GunRevolver.java index 842c321bb..569a47f47 100644 --- a/com/hbm/items/GunRevolver.java +++ b/com/hbm/items/GunRevolver.java @@ -90,10 +90,6 @@ public class GunRevolver extends Item ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) - { - return; - } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; @@ -117,11 +113,6 @@ public class GunRevolver extends Item EntityBullet entityarrow = new EntityBullet(p_77615_2_, p_77615_3_, 3.0F, dmgMin, dmgMax, instakill); entityarrow.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin)); - if (f == 1.0F) - { - entityarrow.setIsCritical(true); - } - p_77615_1_.damageItem(1, p_77615_3_); if(this == ModItems.gun_revolver || this == ModItems.gun_revolver_iron || this == ModItems.gun_revolver_gold || this == ModItems.gun_revolver_schrabidium) { @@ -185,10 +176,6 @@ public class GunRevolver extends Item { ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) - { - return event.result; - } if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ammo)) { @@ -206,8 +193,4 @@ public class GunRevolver extends Item { return 1; } - - public Item getAmmo() { - return null; - } } diff --git a/com/hbm/items/GunXVL1456.java b/com/hbm/items/GunXVL1456.java new file mode 100644 index 000000000..4ef8702b1 --- /dev/null +++ b/com/hbm/items/GunXVL1456.java @@ -0,0 +1,143 @@ +package com.hbm.items; + +import java.util.Random; + +import com.hbm.entity.EntityBullet; +import com.hbm.entity.EntityMiniNuke; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunXVL1456 extends Item { + + Random rand = new Random(); + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int i) { + + int j = this.getMaxItemUseDuration(stack) - i; + ArrowLooseEvent event = new ArrowLooseEvent(player, stack, j); + MinecraftForge.EVENT_BUS.post(event); + // if (event.isCanceled()) { + // return; + // } + j = event.charge; + + if (player.isSneaking() && j >= 20) { + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + + if ((flag || player.inventory.hasItem(ModItems.gun_xvl1456_ammo) && stack.hasTagCompound())) { + EntityBullet entitybullet = new EntityBullet(world, player, 3.0F, j, j + 5, false, "tauDay"); + + entitybullet.setDamage(j + rand.nextInt(6)); + + world.playSoundAtEntity(player, "fireworks.blast", 1.0F, + 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) * 0.75F); + + if (flag) { + entitybullet.canBePickedUp = 2; + } else { + player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo); + } + + entitybullet.setIsCritical(true); + + if (!world.isRemote) { + world.spawnEntityInWorld(entitybullet); + } + } + } + } + + 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_); + MinecraftForge.EVENT_BUS.post(event); + // if (event.isCanceled()) { + // return event.result; + // } + // Made uncancelable to prevent intermod idiocy + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, + boolean p_77663_5_) { + if(p_77663_3_ instanceof EntityPlayer) + { + if(((EntityPlayer)p_77663_3_).getItemInUseCount() < getMaxItemUseDuration(p_77663_1_) - 200 && p_77663_3_.isSneaking() && ((EntityPlayer)p_77663_3_).getItemInUseCount() != 0) + { + if(!p_77663_2_.isRemote) + { + p_77663_2_.createExplosion(p_77663_3_, p_77663_3_.posX, p_77663_3_.posY, p_77663_3_.posZ, 10.0F, true); + ((EntityPlayer)p_77663_3_).dropOneItem(false); + } + } + } + } + + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) + { + World world = player.worldObj; + + if (!player.isSneaking()) { + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) && count % 5 == 0) { + + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "eyyOk"); + entityarrow.setDamage(35 + rand.nextInt(45 - 35)); + + world.playSoundAtEntity(player, "fireworks.blast", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 0.5F); + + if (flag) { + entityarrow.canBePickedUp = 2; + } else { + player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo); + } + + if (!world.isRemote) { + world.spawnEntityInWorld(entityarrow); + } + } + } else { + if (count % 20 == 0 && this.getMaxItemUseDuration(stack) - count != 0) { + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo))) { + if (!flag) { + player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo); + } + } + } + } + } + + @Override + public int getItemEnchantability() { + return 1; + } + +} diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 9bd9526c6..edd873c44 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -342,6 +342,8 @@ public class ModItems { public static Item gun_revolver_cursed_ammo; public static Item gun_fatman; public static Item gun_fatman_ammo; + public static Item gun_xvl1456; + public static Item gun_xvl1456_ammo; public static Item gun_waluigi; public static Item grenade_generic; @@ -854,6 +856,8 @@ public class ModItems { gun_revolver_cursed = new GunRevolver(gun_revolver_cursed_ammo, 25, 40, false).setMaxDamage(5000).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_cursed"); gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_fatman_ammo"); gun_fatman = new GunFatman().setMaxDamage(5000).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_fatman"); + gun_xvl1456_ammo = new Item().setUnlocalizedName("gun_xvl1456_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456_ammo"); + gun_xvl1456 = new GunXVL1456().setUnlocalizedName("gun_xvl1456").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456"); grenade_generic = new ItemGrenade().setUnlocalizedName("grenade_generic").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_generic"); grenade_strong = new ItemGrenade().setUnlocalizedName("grenade_strong").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_strong"); @@ -1407,6 +1411,8 @@ public class ModItems { GameRegistry.registerItem(gun_rpg_ammo, gun_rpg_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName()); GameRegistry.registerItem(gun_fatman_ammo, gun_fatman_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName()); + GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName()); //Grenades GameRegistry.registerItem(grenade_generic, grenade_generic.getUnlocalizedName()); diff --git a/com/hbm/lib/ModDamageSource.java b/com/hbm/lib/ModDamageSource.java index b377a3558..7dacbf36a 100644 --- a/com/hbm/lib/ModDamageSource.java +++ b/com/hbm/lib/ModDamageSource.java @@ -21,6 +21,10 @@ public class ModDamageSource extends DamageSource { { return (new EntityDamageSourceIndirect("revolverBullet", p_76353_0_, p_76353_1_)).setProjectile(); } + public static DamageSource causeTauDamage(EntityBullet p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("tau", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); + } public static DamageSource euthanized(Entity p_76353_0_, Entity p_76353_1_) { return (new EntityDamageSourceIndirect("euthanized", p_76353_0_, p_76353_1_)).setDamageBypassesArmor(); diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index d5bfbbc37..6df796eb2 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -96,6 +96,7 @@ import com.hbm.render.ItemRenderSteelPoles; import com.hbm.render.ItemRenderTapeRecorder; import com.hbm.render.ItemRenderTestBombAdvanced; import com.hbm.render.ItemRenderTestContainer; +import com.hbm.render.ItemRenderXVL1456; import com.hbm.render.ModEffectRenderer; import com.hbm.render.RenderBigNuke; import com.hbm.render.RenderBombMulti; @@ -221,6 +222,7 @@ public class ClientProxy extends ServerProxy MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_schrabidium, new ItemRenderRevolverSchrabidium()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_cursed, new ItemRenderRevolverCursed()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_xvl1456, new ItemRenderXVL1456()); RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderRocket()); RenderingRegistry.registerEntityRenderingHandler(EntityMiniNuke.class, new RenderMiniNuke()); diff --git a/com/hbm/render/ItemRenderXVL1456.java b/com/hbm/render/ItemRenderXVL1456.java new file mode 100644 index 000000000..5686092d7 --- /dev/null +++ b/com/hbm/render/ItemRenderXVL1456.java @@ -0,0 +1,75 @@ +package com.hbm.render; + +import org.lwjgl.opengl.GL11; + +import com.hbm.items.GunXVL1456; +import com.hbm.lib.RefStrings; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +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 ItemRenderXVL1456 implements IItemRenderer { + + protected ModelXVL1456 swordModel; + + public ItemRenderXVL1456() { + swordModel = new ModelXVL1456(); + } + + @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) { + float f = 0; + if((Entity)data[1] instanceof EntityPlayer) + f = ((EntityPlayer)data[1]).getItemInUseCount() > 0 && ((Entity)data[1]).isSneaking() ? 0.05F : 0; + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelXVL1456.png")); + GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(-0.9F, 0.0F, -0.2F); + GL11.glScalef(0.3F, 0.3F, 0.3F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelXVL1456.png")); + GL11.glTranslatef(0.25F, 0F, 1F); + 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.glTranslatef(0.0F, -0.2F, -0.5F); + GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(0.5F, -0.2F, -0.2F); + GL11.glScalef(0.75F, 0.75F, 0.75F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ModelXVL1456.java b/com/hbm/render/ModelXVL1456.java new file mode 100644 index 000000000..4f77d658b --- /dev/null +++ b/com/hbm/render/ModelXVL1456.java @@ -0,0 +1,302 @@ +// Date: 12.07.2016 17:01:02 +// 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; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelXVL1456 extends ModelBase +{ + //fields + ModelRenderer CoilFront; + ModelRenderer Panel1; + ModelRenderer Panel2; + ModelRenderer Panel3; + ModelRenderer CoilBack; + ModelRenderer SpinPivot; + ModelRenderer Barrel; + ModelRenderer CoilBarrel; + ModelRenderer PipeBarrel; + ModelRenderer PipeHolder; + ModelRenderer Rail1; + ModelRenderer Rail2; + ModelRenderer Rail3; + ModelRenderer Rail4; + ModelRenderer Rail5; + ModelRenderer Rail6; + ModelRenderer TankHolder; + ModelRenderer HandleBase; + ModelRenderer HandleShaft; + ModelRenderer HanldeGrip; + ModelRenderer SpinC1; + ModelRenderer SpinC2; + ModelRenderer SpinC3; + ModelRenderer SpinP1; + ModelRenderer SpinP2; + ModelRenderer SpinP3; + ModelRenderer Battery1; + ModelRenderer Battery2; + ModelRenderer StockBase; + ModelRenderer StockTrigger; + ModelRenderer Shape1; + int i = 0; + + public ModelXVL1456() + { + textureWidth = 128; + textureHeight = 64; + + CoilFront = new ModelRenderer(this, 0, 0); + CoilFront.addBox(0F, 0F, 0F, 4, 10, 10); + CoilFront.setRotationPoint(0F, 0F, 0F); + CoilFront.setTextureSize(128, 64); + CoilFront.mirror = true; + setRotation(CoilFront, 0F, 0F, 0F); + Panel1 = new ModelRenderer(this, 0, 40); + Panel1.addBox(0F, 0F, 0F, 5, 11, 3); + Panel1.setRotationPoint(4F, -1F, 3.5F); + Panel1.setTextureSize(128, 64); + Panel1.mirror = true; + setRotation(Panel1, 0F, 0F, 0F); + Panel2 = new ModelRenderer(this, 0, 54); + Panel2.addBox(0F, 0F, 0F, 5, 3, 3); + Panel2.setRotationPoint(9F, -1F, 3.5F); + Panel2.setTextureSize(128, 64); + Panel2.mirror = true; + setRotation(Panel2, 0F, 0F, 0F); + Panel3 = new ModelRenderer(this, 16, 40); + Panel3.addBox(0F, 0F, 0F, 3, 11, 3); + Panel3.setRotationPoint(14F, -1F, 3.5F); + Panel3.setTextureSize(128, 64); + Panel3.mirror = true; + setRotation(Panel3, 0F, 0F, 0F); + CoilBack = new ModelRenderer(this, 0, 20); + CoilBack.addBox(0F, 0F, 0F, 4, 10, 10); + CoilBack.setRotationPoint(17F, 0F, 0F); + CoilBack.setTextureSize(128, 64); + CoilBack.mirror = true; + setRotation(CoilBack, 0F, 0F, 0F); + SpinPivot = new ModelRenderer(this, 66, 42); + SpinPivot.addBox(0F, 0F, 0F, 5, 1, 1); + SpinPivot.setRotationPoint(9F, 5.5F, 4.5F); + SpinPivot.setTextureSize(128, 64); + SpinPivot.mirror = true; + setRotation(SpinPivot, 0F, 0F, 0F); + Barrel = new ModelRenderer(this, 64, 0); + Barrel.addBox(0F, 0F, 0F, 28, 1, 1); + Barrel.setRotationPoint(-28F, 4.5F, 4.5F); + Barrel.setTextureSize(128, 64); + Barrel.mirror = true; + setRotation(Barrel, 0F, 0F, 0F); + CoilBarrel = new ModelRenderer(this, 28, 4); + CoilBarrel.addBox(0F, 0F, 0F, 9, 7, 7); + CoilBarrel.setRotationPoint(-19F, 1.5F, 1.5F); + CoilBarrel.setTextureSize(128, 64); + CoilBarrel.mirror = true; + setRotation(CoilBarrel, 0F, 0F, 0F); + PipeBarrel = new ModelRenderer(this, 28, 0); + PipeBarrel.addBox(0F, 0F, 0F, 16, 2, 2); + PipeBarrel.setRotationPoint(-13F, 6F, -0.4666667F); + PipeBarrel.setTextureSize(128, 64); + PipeBarrel.mirror = true; + setRotation(PipeBarrel, 0F, 0F, 0F); + PipeHolder = new ModelRenderer(this, 42, 37); + PipeHolder.addBox(0F, 0F, 0F, 3, 4, 1); + PipeHolder.setRotationPoint(0.5F, 5F, -1F); + PipeHolder.setTextureSize(128, 64); + PipeHolder.mirror = true; + setRotation(PipeHolder, 0F, 0F, 0F); + Rail1 = new ModelRenderer(this, 28, 27); + Rail1.addBox(0F, 0F, 0F, 1, 5, 1); + Rail1.setRotationPoint(5F, -2F, 2.5F); + Rail1.setTextureSize(128, 64); + Rail1.mirror = true; + setRotation(Rail1, 0F, 0F, 0F); + Rail2 = new ModelRenderer(this, 32, 27); + Rail2.addBox(0F, 0F, 0F, 1, 5, 1); + Rail2.setRotationPoint(5F, -2F, 6.5F); + Rail2.setTextureSize(128, 64); + Rail2.mirror = true; + setRotation(Rail2, 0F, 0F, 0F); + Rail3 = new ModelRenderer(this, 28, 23); + Rail3.addBox(0F, 0F, 0F, 18, 1, 1); + Rail3.setRotationPoint(-12F, -3F, 2.5F); + Rail3.setTextureSize(128, 64); + Rail3.mirror = true; + setRotation(Rail3, 0F, 0F, 0F); + Rail4 = new ModelRenderer(this, 28, 25); + Rail4.addBox(0F, 0F, 0F, 18, 1, 1); + Rail4.setRotationPoint(-12F, -3F, 6.5F); + Rail4.setTextureSize(128, 64); + Rail4.mirror = true; + setRotation(Rail4, 0F, 0F, 0F); + Rail5 = new ModelRenderer(this, 28, 18); + Rail5.addBox(0F, 0F, 0F, 1, 4, 1); + Rail5.setRotationPoint(-12F, -2F, 2.5F); + Rail5.setTextureSize(128, 64); + Rail5.mirror = true; + setRotation(Rail5, 0F, 0F, 0F); + Rail6 = new ModelRenderer(this, 32, 18); + Rail6.addBox(0F, 0F, 0F, 1, 4, 1); + Rail6.setRotationPoint(-12F, -2F, 6.5F); + Rail6.setTextureSize(128, 64); + Rail6.mirror = true; + setRotation(Rail6, 0F, 0F, 0F); + TankHolder = new ModelRenderer(this, 42, 27); + TankHolder.addBox(0F, 0F, 0F, 4, 2, 1); + TankHolder.setRotationPoint(4.5F, 4F, 2.5F); + TankHolder.setTextureSize(128, 64); + TankHolder.mirror = true; + setRotation(TankHolder, 0F, 0F, 0F); + HandleBase = new ModelRenderer(this, 28, 33); + HandleBase.addBox(0F, 0F, 0F, 6, 1, 1); + HandleBase.setRotationPoint(9F, -2F, 4.5F); + HandleBase.setTextureSize(128, 64); + HandleBase.mirror = true; + setRotation(HandleBase, 0F, 0F, 0F); + HandleShaft = new ModelRenderer(this, 28, 35); + HandleShaft.addBox(0F, 0F, 0F, 1, 3, 1); + HandleShaft.setRotationPoint(8F, -4F, 4.5F); + HandleShaft.setTextureSize(128, 64); + HandleShaft.mirror = true; + setRotation(HandleShaft, 0F, 0F, 0F); + HanldeGrip = new ModelRenderer(this, 28, 39); + HanldeGrip.addBox(0F, 0F, 0F, 5, 2, 2); + HanldeGrip.setRotationPoint(9F, -5F, 4F); + HanldeGrip.setTextureSize(128, 64); + HanldeGrip.mirror = true; + setRotation(HanldeGrip, 0F, 0F, 0F); + SpinC1 = new ModelRenderer(this, 66, 21); + SpinC1.addBox(0F, -3.5F, -2F, 4, 3, 4); + SpinC1.setRotationPoint(9.5F, 6F, 5F); + SpinC1.setTextureSize(128, 64); + SpinC1.mirror = true; + setRotation(SpinC1, 0F, 0F, 0F); + SpinC2 = new ModelRenderer(this, 66, 28); + SpinC2.addBox(0F, -3.5F, -2F, 4, 3, 4); + SpinC2.setRotationPoint(9.5F, 6F, 5F); + SpinC2.setTextureSize(128, 64); + SpinC2.mirror = true; + setRotation(SpinC2, 2.094395F, 0F, 0F); + SpinC3 = new ModelRenderer(this, 66, 35); + SpinC3.addBox(0F, -3.5F, -2F, 4, 3, 4); + SpinC3.setRotationPoint(9.5F, 6F, 5F); + SpinC3.setTextureSize(128, 64); + SpinC3.mirror = true; + setRotation(SpinC3, -2.094395F, 0F, 0F); + SpinP1 = new ModelRenderer(this, 82, 21); + SpinP1.addBox(0F, -3F, -1.5F, 3, 2, 3); + SpinP1.setRotationPoint(10F, 6F, 5F); + SpinP1.setTextureSize(128, 64); + SpinP1.mirror = true; + setRotation(SpinP1, 1.047198F, 0F, 0F); + SpinP2 = new ModelRenderer(this, 82, 26); + SpinP2.addBox(0F, -3F, -1.5F, 3, 2, 3); + SpinP2.setRotationPoint(10F, 6F, 5F); + SpinP2.setTextureSize(128, 64); + SpinP2.mirror = true; + setRotation(SpinP2, 3.141593F, 0F, 0F); + SpinP3 = new ModelRenderer(this, 82, 31); + SpinP3.addBox(0F, -3F, -1.5F, 3, 2, 3); + SpinP3.setRotationPoint(10F, 6F, 5F); + SpinP3.setTextureSize(128, 64); + SpinP3.mirror = true; + setRotation(SpinP3, -1.047198F, 0F, 0F); + Battery1 = new ModelRenderer(this, 64, 2); + Battery1.addBox(0F, 0F, 0F, 1, 1, 3); + Battery1.setRotationPoint(17.8F, -1F, 3.5F); + Battery1.setTextureSize(128, 64); + Battery1.mirror = true; + setRotation(Battery1, 0F, 0F, 0F); + Battery2 = new ModelRenderer(this, 72, 2); + Battery2.addBox(0F, 0F, 0F, 1, 1, 3); + Battery2.setRotationPoint(19.3F, -1F, 3.5F); + Battery2.setTextureSize(128, 64); + Battery2.mirror = true; + setRotation(Battery2, 0F, 0F, 0F); + StockBase = new ModelRenderer(this, 60, 12); + StockBase.addBox(0F, 0F, 0F, 12, 6, 3); + StockBase.setRotationPoint(22F, 7F, 3.5F); + StockBase.setTextureSize(128, 64); + StockBase.mirror = true; + setRotation(StockBase, 0F, 0F, 0F); + StockTrigger = new ModelRenderer(this, 60, 6); + StockTrigger.addBox(-3.5F, -1.5F, 0F, 5, 4, 2); + StockTrigger.setRotationPoint(22F, 10F, 4F); + StockTrigger.setTextureSize(128, 64); + StockTrigger.mirror = true; + setRotation(StockTrigger, 0F, 0F, 0.7853982F); + Shape1 = new ModelRenderer(this, 42, 30); + Shape1.addBox(0F, -1F, -1F, 2, 5, 2); + Shape1.setRotationPoint(5.5F, 6F, 2.5F); + Shape1.setTextureSize(128, 64); + Shape1.mirror = true; + setRotation(Shape1, -0.7853982F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float rot) + { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + CoilFront.render(f5); + Panel1.render(f5); + Panel2.render(f5); + Panel3.render(f5); + CoilBack.render(f5); + SpinPivot.render(f5); + Barrel.render(f5); + CoilBarrel.render(f5); + PipeBarrel.render(f5); + PipeHolder.render(f5); + Rail1.render(f5); + Rail2.render(f5); + Rail3.render(f5); + Rail4.render(f5); + Rail5.render(f5); + Rail6.render(f5); + TankHolder.render(f5); + HandleBase.render(f5); + HandleShaft.render(f5); + HanldeGrip.render(f5); + SpinC1.rotateAngleX += rot; + SpinC2.rotateAngleX += rot; + SpinC3.rotateAngleX += rot; + SpinP1.rotateAngleX += rot; + SpinP2.rotateAngleX += rot; + SpinP3.rotateAngleX += rot; + SpinC1.render(f5); + SpinC2.render(f5); + SpinC3.render(f5); + SpinP1.render(f5); + SpinP2.render(f5); + SpinP3.render(f5); + Battery1.render(f5); + Battery2.render(f5); + StockBase.render(f5); + StockTrigger.render(f5); + Shape1.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); + } + +}