diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 522ace673..69015c2bd 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -176,6 +176,7 @@ death.attack.bang=%1$s wurde in mundgerechte Stücke zerfetzt. death.attack.pc=%1$s wurde zu einer Pfütze in der pinken Wolke. death.attack.cloud=%1$s schmolz wie ein Eis in der Sonne. death.attack.lead=%1$s starb an Bleivergiftung. +death.attack.taint=%1$s starb an Flux-Tumoren. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert @@ -1265,6 +1266,7 @@ item.thermo_unit_exo.name=Hitzeverteilungseinheit item.bomb_waffle.name=Massenvernichtungswaffel item.schnitzel_vegan.name=Veganes Schnitzel +item.apple_lead.name=Bleiapfel item.apple_schrabidium.name=Schrabidiumapfel item.cotton_candy.name=Radioaktive Zuckerwatte item.tem_flakes.name=Tem Flakes diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index e969bda49..d35b0c109 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -176,6 +176,7 @@ death.attack.bang=%1$s was blasted into bite-sized pieces. death.attack.pc=%1$s was reduced to a puddle in the pink cloud. death.attack.cloud=%1$s melted like a popsicle in the sun. death.attack.lead=%1$s died from lead poisoning. +death.attack.taint=%1$s died from flux tumors. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword @@ -1265,6 +1266,7 @@ item.thermo_unit_exo.name=Heat Distribution Unit item.bomb_waffle.name=Waffle of Mass Destruction item.schnitzel_vegan.name=Vegan Schnitzel +item.apple_lead.name=Lead Apple item.apple_schrabidium.name=Schrabidium Apple item.cotton_candy.name=Radioactive Cotton Candy item.tem_flakes.name=Tem Flakes diff --git a/assets/hbm/textures/blocks/block_rust.png b/assets/hbm/textures/blocks/block_rust.png new file mode 100644 index 000000000..13a7a9db9 Binary files /dev/null and b/assets/hbm/textures/blocks/block_rust.png differ diff --git a/assets/hbm/textures/blocks/brick_concrete_broken.png b/assets/hbm/textures/blocks/brick_concrete_broken.png new file mode 100644 index 000000000..2bd3b9d61 Binary files /dev/null and b/assets/hbm/textures/blocks/brick_concrete_broken.png differ diff --git a/assets/hbm/textures/blocks/brick_concrete_cracked.png b/assets/hbm/textures/blocks/brick_concrete_cracked.png new file mode 100644 index 000000000..113a9d43c Binary files /dev/null and b/assets/hbm/textures/blocks/brick_concrete_cracked.png differ diff --git a/assets/hbm/textures/blocks/brick_concrete_mossy.png b/assets/hbm/textures/blocks/brick_concrete_mossy.png new file mode 100644 index 000000000..f3a97866d Binary files /dev/null and b/assets/hbm/textures/blocks/brick_concrete_mossy.png differ diff --git a/assets/hbm/textures/blocks/deco_blank_new.png b/assets/hbm/textures/blocks/deco_blank_new.png new file mode 100644 index 000000000..53abec415 Binary files /dev/null and b/assets/hbm/textures/blocks/deco_blank_new.png differ diff --git a/assets/hbm/textures/blocks/reinforced_lamp_on.png b/assets/hbm/textures/blocks/reinforced_lamp_on.png index 309d1f9e4..20ba50a0f 100644 Binary files a/assets/hbm/textures/blocks/reinforced_lamp_on.png and b/assets/hbm/textures/blocks/reinforced_lamp_on.png differ diff --git a/assets/hbm/textures/gui/gui_nei_assembler.png b/assets/hbm/textures/gui/gui_nei_assembler.png index d0fdbc18f..642bab784 100644 Binary files a/assets/hbm/textures/gui/gui_nei_assembler.png and b/assets/hbm/textures/gui/gui_nei_assembler.png differ diff --git a/assets/hbm/textures/gui/gui_nei_chemplant.png b/assets/hbm/textures/gui/gui_nei_chemplant.png index a76fd6a85..4976a5889 100644 Binary files a/assets/hbm/textures/gui/gui_nei_chemplant.png and b/assets/hbm/textures/gui/gui_nei_chemplant.png differ diff --git a/assets/hbm/textures/items/apple_lead.png b/assets/hbm/textures/items/apple_lead.png new file mode 100644 index 000000000..2c66e6cf6 Binary files /dev/null and b/assets/hbm/textures/items/apple_lead.png differ diff --git a/assets/hbm/textures/models/chemplant_base_new.png b/assets/hbm/textures/models/chemplant_base_new.png index 9f42f6249..d6816b7dc 100644 Binary files a/assets/hbm/textures/models/chemplant_base_new.png and b/assets/hbm/textures/models/chemplant_base_new.png differ diff --git a/assets/hbm/textures/models/lavabase_small.png b/assets/hbm/textures/models/lavabase_small.png index b52e521c7..363ed40e4 100644 Binary files a/assets/hbm/textures/models/lavabase_small.png and b/assets/hbm/textures/models/lavabase_small.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index e748db679..c6afd8646 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -137,6 +137,9 @@ public class ModBlocks { public static Block concrete_smooth; public static Block concrete; public static Block brick_concrete; + public static Block brick_concrete_mossy; + public static Block brick_concrete_cracked; + public static Block brick_concrete_broken; public static Block brick_obsidian; public static Block brick_light; public static Block brick_compound; @@ -762,6 +765,9 @@ public class ModBlocks { concrete_smooth = new BlockGeneric(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete"); concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile"); brick_concrete = new BlockGeneric(Material.rock).setBlockName("brick_concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete"); + brick_concrete_mossy = new BlockGeneric(Material.rock).setBlockName("brick_concrete_mossy").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_mossy"); + brick_concrete_cracked = new BlockGeneric(Material.rock).setBlockName("brick_concrete_cracked").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(2000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_cracked"); + brick_concrete_broken = new BlockGeneric(Material.rock).setBlockName("brick_concrete_broken").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(1500.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_broken"); brick_obsidian = new BlockGeneric(Material.rock).setBlockName("brick_obsidian").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(8000.0F).setBlockTextureName(RefStrings.MODID + ":brick_obsidian"); brick_light = new BlockGeneric(Material.rock).setBlockName("brick_light").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_light"); brick_compound = new BlockGeneric(Material.rock).setBlockName("brick_compound").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(10000.0F).setBlockTextureName(RefStrings.MODID + ":brick_compound"); @@ -1270,6 +1276,9 @@ public class ModBlocks { GameRegistry.registerBlock(concrete_smooth, concrete_smooth.getUnlocalizedName()); GameRegistry.registerBlock(concrete, concrete.getUnlocalizedName()); GameRegistry.registerBlock(brick_concrete, brick_concrete.getUnlocalizedName()); + GameRegistry.registerBlock(brick_concrete_mossy, brick_concrete_mossy.getUnlocalizedName()); + GameRegistry.registerBlock(brick_concrete_cracked, brick_concrete_cracked.getUnlocalizedName()); + GameRegistry.registerBlock(brick_concrete_broken, brick_concrete_broken.getUnlocalizedName()); GameRegistry.registerBlock(brick_obsidian, brick_obsidian.getUnlocalizedName()); GameRegistry.registerBlock(brick_compound, brick_compound.getUnlocalizedName()); GameRegistry.registerBlock(brick_light, brick_light.getUnlocalizedName()); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 677cef50a..feacef6a4 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -1028,6 +1028,7 @@ public class ModItems { public static Item bomb_waffle; public static Item schnitzel_vegan; public static Item cotton_candy; + public static Item apple_lead; public static Item apple_schrabidium; public static Item tem_flakes; public static Item glowing_stew; @@ -2500,6 +2501,7 @@ public class ModItems { bomb_waffle = new ItemWaffle(20, false).setUnlocalizedName("bomb_waffle").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bomb_waffle"); schnitzel_vegan = new ItemSchnitzelVegan(0, true).setUnlocalizedName("schnitzel_vegan").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":schnitzel_vegan"); cotton_candy = new ItemCottonCandy(5, false).setUnlocalizedName("cotton_candy").setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":cotton_candy"); + apple_lead = new ItemAppleSchrabidium(5, 0, false).setUnlocalizedName("apple_lead").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":apple_lead"); apple_schrabidium = new ItemAppleSchrabidium(20, 100, false).setUnlocalizedName("apple_schrabidium").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":apple_schrabidium"); tem_flakes = new ItemTemFlakes(0, 0, false).setUnlocalizedName("tem_flakes").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tem_flakes"); glowing_stew = new ItemSoup(6).setUnlocalizedName("glowing_stew").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glowing_stew"); @@ -4310,6 +4312,7 @@ public class ModItems { GameRegistry.registerItem(bomb_waffle, bomb_waffle.getUnlocalizedName()); GameRegistry.registerItem(schnitzel_vegan, schnitzel_vegan.getUnlocalizedName()); GameRegistry.registerItem(cotton_candy, cotton_candy.getUnlocalizedName()); + GameRegistry.registerItem(apple_lead, apple_lead.getUnlocalizedName()); GameRegistry.registerItem(apple_schrabidium, apple_schrabidium.getUnlocalizedName()); GameRegistry.registerItem(tem_flakes, tem_flakes.getUnlocalizedName()); GameRegistry.registerItem(glowing_stew, glowing_stew.getUnlocalizedName()); diff --git a/com/hbm/items/food/ItemAppleSchrabidium.java b/com/hbm/items/food/ItemAppleSchrabidium.java index 0c8c3ebe6..bf5f50032 100644 --- a/com/hbm/items/food/ItemAppleSchrabidium.java +++ b/com/hbm/items/food/ItemAppleSchrabidium.java @@ -2,6 +2,10 @@ package com.hbm.items.food; import java.util.List; +import com.hbm.items.ModItems; +import com.hbm.lib.ModDamageSource; +import com.hbm.potion.HbmPotion; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; @@ -30,52 +34,63 @@ public class ItemAppleSchrabidium extends ItemFood { } @Override - protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, EntityPlayer p_77849_3_) - { - if (!p_77849_2_.isRemote) - { - p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 6000, 0)); - } + protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) { + + if (!world.isRemote) { + + if(stack.getItem() == ModItems.apple_schrabidium) { + if (stack.getItemDamage() == 0) { + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4)); + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 6000, 0)); + } + + if (stack.getItemDamage() == 1) { + + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 1200, 4)); + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 1200, 4)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1200, 0)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 4)); + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1200, 2)); + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1200, 2)); + player.addPotionEffect(new PotionEffect(Potion.jump.id, 1200, 4)); + player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1200, 9)); + player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 1200, 4)); + player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1200, 9)); + } + + if (stack.getItemDamage() == 2) { + + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 2147483647, 4)); + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2147483647, 1)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2147483647, 0)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2147483647, 9)); + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2147483647, 4)); + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2147483647, 3)); + player.addPotionEffect(new PotionEffect(Potion.jump.id, 2147483647, 4)); + player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 2147483647, 24)); + player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2147483647, 14)); + player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 2147483647, 99)); + } + } + + if(stack.getItem() == ModItems.apple_lead) { + + if (stack.getItemDamage() == 0) { + player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 15 * 20, 2)); + } + + if (stack.getItemDamage() == 1) { - if (p_77849_1_.getItemDamage() == 1) - { - if (!p_77849_2_.isRemote) - { - p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 1200, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 1200, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1200, 0)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1200, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1200, 2)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1200, 2)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 1200, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1200, 9)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 1200, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1200, 9)); - } - } - - if (p_77849_1_.getItemDamage() == 2) - { - if (!p_77849_2_.isRemote) - { - p_77849_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 2147483647, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 2147483647, 1)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2147483647, 0)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2147483647, 9)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2147483647, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2147483647, 3)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 2147483647, 4)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 2147483647, 24)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2147483647, 14)); - p_77849_3_.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 2147483647, 99)); - } - } - else - { - super.onFoodEaten(p_77849_1_, p_77849_2_, p_77849_3_); - } + player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 60 * 20, 4)); + } + + if (stack.getItemDamage() == 2) { + + player.attackEntityFrom(ModDamageSource.lead, 500F); + } + } + } } @Override diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index ccfbafa07..ba4925ce6 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -1011,6 +1011,9 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 0), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.nugget_schrabidium, 'A', Items.apple }); GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 1), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.ingot_schrabidium, 'A', Items.apple }); GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 2), new Object[] { "SSS", "SAS", "SSS", 'S', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'A', Items.apple }); + GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 0), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.nugget_lead, 'A', Items.apple }); + GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 1), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.ingot_lead, 'A', Items.apple }); + GameRegistry.addRecipe(new ItemStack(ModItems.apple_lead, 1, 2), new Object[] { "SSS", "SAS", "SSS", 'S', ModBlocks.block_lead, 'A', Items.apple }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 0), new Object[] { Items.gold_nugget, Items.paper }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 1), new Object[] { Items.gold_nugget, Items.gold_nugget, Items.gold_nugget, Items.paper }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 2), new Object[] { Items.gold_ingot, Items.gold_ingot, Items.gold_nugget, Items.gold_nugget, Items.paper }); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 5f75c85fc..7bd175f25 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -1348,6 +1348,11 @@ public class MainRegistry HazmatRegistry.instance.registerHazmat(ModItems.hazmat_legs_grey, 0.6F); HazmatRegistry.instance.registerHazmat(ModItems.hazmat_boots_grey, 0.2F); + HazmatRegistry.instance.registerHazmat(ModItems.t45_helmet, 0.4F); + HazmatRegistry.instance.registerHazmat(ModItems.t45_plate, 0.8F); + HazmatRegistry.instance.registerHazmat(ModItems.t45_legs, 0.6F); + HazmatRegistry.instance.registerHazmat(ModItems.t45_boots, 0.2F); + HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_helmet, 0.6F); HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_plate, 1.2F); HazmatRegistry.instance.registerHazmat(ModItems.hazmat_paa_legs, 0.9F); diff --git a/com/hbm/main/ModEventHandlerClient.java b/com/hbm/main/ModEventHandlerClient.java index 89ae3e804..e60250faa 100644 --- a/com/hbm/main/ModEventHandlerClient.java +++ b/com/hbm/main/ModEventHandlerClient.java @@ -1,5 +1,7 @@ package com.hbm.main; +import org.lwjgl.opengl.GL11; + import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.entity.projectile.EntityChopperMine; import com.hbm.handler.BulletConfigSyncingUtil; @@ -98,11 +100,15 @@ public class ModEventHandlerClient { @SubscribeEvent public void preRenderEvent(RenderPlayerEvent.Pre event) { + //event.setCanceled(true); + RenderPlayer renderer = event.renderer; AbstractClientPlayer player = (AbstractClientPlayer)event.entityPlayer; ResourceLocation cloak = RenderAccessoryUtility.getCloakFromPlayer(player); + //GL11.glRotated(180, 1, 0, 0); + if(cloak != null) player.func_152121_a(Type.CAPE, cloak); diff --git a/com/hbm/packet/TEAssemblerPacket.java b/com/hbm/packet/TEAssemblerPacket.java index 1e9110fe1..fddaeedcb 100644 --- a/com/hbm/packet/TEAssemblerPacket.java +++ b/com/hbm/packet/TEAssemblerPacket.java @@ -14,7 +14,6 @@ public class TEAssemblerPacket implements IMessage { int x; int y; int z; - float spin; boolean progress; public TEAssemblerPacket() @@ -22,12 +21,11 @@ public class TEAssemblerPacket implements IMessage { } - public TEAssemblerPacket(int x, int y, int z, float spin, boolean bool) + public TEAssemblerPacket(int x, int y, int z, boolean bool) { this.x = x; this.y = y; this.z = z; - this.spin = spin; this.progress = bool; } @@ -36,7 +34,6 @@ public class TEAssemblerPacket implements IMessage { x = buf.readInt(); y = buf.readInt(); z = buf.readInt(); - spin = buf.readFloat(); progress = buf.readBoolean(); } @@ -45,7 +42,6 @@ public class TEAssemblerPacket implements IMessage { buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); - buf.writeFloat(spin); buf.writeBoolean(progress); } @@ -58,7 +54,6 @@ public class TEAssemblerPacket implements IMessage { if (te != null && te instanceof TileEntityMachineAssembler) { TileEntityMachineAssembler gen = (TileEntityMachineAssembler) te; - gen.rotation = m.spin; gen.isProgressing = m.progress; } return null; diff --git a/com/hbm/packet/TEChemplantPacket.java b/com/hbm/packet/TEChemplantPacket.java index e134529cd..7b4030f81 100644 --- a/com/hbm/packet/TEChemplantPacket.java +++ b/com/hbm/packet/TEChemplantPacket.java @@ -15,7 +15,6 @@ public class TEChemplantPacket implements IMessage { int x; int y; int z; - float spin; boolean isProgressing; public TEChemplantPacket() @@ -23,12 +22,11 @@ public class TEChemplantPacket implements IMessage { } - public TEChemplantPacket(int x, int y, int z, float spin, boolean isProgressing) + public TEChemplantPacket(int x, int y, int z, boolean isProgressing) { this.x = x; this.y = y; this.z = z; - this.spin = spin; this.isProgressing = isProgressing; } @@ -37,7 +35,6 @@ public class TEChemplantPacket implements IMessage { x = buf.readInt(); y = buf.readInt(); z = buf.readInt(); - spin = buf.readFloat(); isProgressing = buf.readBoolean(); } @@ -46,7 +43,6 @@ public class TEChemplantPacket implements IMessage { buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); - buf.writeFloat(spin); buf.writeBoolean(isProgressing); } @@ -59,7 +55,6 @@ public class TEChemplantPacket implements IMessage { if (te != null && te instanceof TileEntityMachineChemplant) { TileEntityMachineChemplant gen = (TileEntityMachineChemplant) te; - gen.rotation = m.spin; gen.isProgressing = m.isProgressing; } return null; diff --git a/com/hbm/render/tileentity/RenderAssembler.java b/com/hbm/render/tileentity/RenderAssembler.java index ef6aa1a65..a09496c4a 100644 --- a/com/hbm/render/tileentity/RenderAssembler.java +++ b/com/hbm/render/tileentity/RenderAssembler.java @@ -94,7 +94,10 @@ public class RenderAssembler extends TileEntitySpecialRenderer { if(offset > 500) offset = 500 - (offset - 500); - GL11.glTranslated(offset * 0.003 - 0.75, 0, 0); + TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity; + + if(assembler.isProgressing) + GL11.glTranslated(offset * 0.003 - 0.75, 0, 0); sliderModel.renderAll(); @@ -103,8 +106,9 @@ public class RenderAssembler extends TileEntitySpecialRenderer { double sway = (System.currentTimeMillis() % 2000) / 2; sway = Math.sin(sway / Math.PI / 50); - - GL11.glTranslated(0, 0, sway * 0.3); + + if(assembler.isProgressing) + GL11.glTranslated(0, 0, sway * 0.3); armModel.renderAll(); GL11.glPopMatrix(); @@ -137,7 +141,12 @@ public class RenderAssembler extends TileEntitySpecialRenderer { bindTexture(cogTexture); int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5; + + TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity; + if(!assembler.isProgressing) + rotation = 0; + GL11.glPushMatrix(); GL11.glTranslated(-0.6, 0.75, 1.0625); GL11.glRotatef(-rotation, 0F, 0F, 1F); diff --git a/com/hbm/render/tileentity/RenderChemplant.java b/com/hbm/render/tileentity/RenderChemplant.java index 63bcc627b..c37d19ca5 100644 --- a/com/hbm/render/tileentity/RenderChemplant.java +++ b/com/hbm/render/tileentity/RenderChemplant.java @@ -97,15 +97,23 @@ public class RenderChemplant extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslated(-0.625, 0, 0.625); - if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name())) + + if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name()) && chem.isProgressing) GL11.glRotatef(-rotation, 0F, 1F, 0F); + else + GL11.glRotatef(-45, 0F, 1F, 0F); + spinnerModel.renderAll(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(0.625, 0, 0.625); - if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name())) + + if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name()) && chem.isProgressing) GL11.glRotatef(rotation, 0F, 1F, 0F); + else + GL11.glRotatef(45, 0F, 1F, 0F); + spinnerModel.renderAll(); GL11.glPopMatrix(); @@ -114,7 +122,12 @@ public class RenderChemplant extends TileEntitySpecialRenderer { bindTexture(pistonTexture); GL11.glPushMatrix(); - GL11.glTranslated(0, push, 0); + + if(chem.isProgressing) + GL11.glTranslated(0, push, 0); + else + GL11.glTranslated(0, -0.25, 0); + pistonModel.renderAll(); GL11.glPopMatrix(); @@ -122,14 +135,19 @@ public class RenderChemplant extends TileEntitySpecialRenderer { int color = 0; GL11.glDisable(GL11.GL_LIGHTING); - if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name())) { + if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name())) { GL11.glPushMatrix(); - HmfController.setMod(50000D, -250D); - color = chem.tanks[1].getTankType().getColor(); + + if(chem.isProgressing) + HmfController.setMod(50000D, -250D); + else + HmfController.setMod(50000D, -50000D); + + color = chem.tanks[0].getTankType().getColor(); GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0)); GL11.glTranslated(-0.625, 0, 0.625); - int count = chem.tanks[1].getFill() / 1000; + int count = chem.tanks[0].getFill() / 1000; for(int i = 0; i < count; i++) { if(i < count - 1) @@ -141,14 +159,19 @@ public class RenderChemplant extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - if(!chem.tanks[0].getTankType().name().equals(FluidType.NONE.name())) { + if(!chem.tanks[1].getTankType().name().equals(FluidType.NONE.name())) { GL11.glPushMatrix(); - HmfController.setMod(50000D, 250D); - color = chem.tanks[0].getTankType().getColor(); + + if(chem.isProgressing) + HmfController.setMod(50000D, 250D); + else + HmfController.setMod(50000D, 50000D); + + color = chem.tanks[1].getTankType().getColor(); GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0)); GL11.glTranslated(0.625, 0, 0.625); - int count = chem.tanks[0].getFill() / 1000; + int count = chem.tanks[1].getFill() / 1000; for(int i = 0; i < count; i++) { if(i < count - 1) diff --git a/com/hbm/tileentity/machine/TileEntityMachineAssembler.java b/com/hbm/tileentity/machine/TileEntityMachineAssembler.java index d024fe81e..f653ae52c 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineAssembler.java +++ b/com/hbm/tileentity/machine/TileEntityMachineAssembler.java @@ -35,7 +35,6 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve public static final long maxPower = 100000; public int progress; public int maxProgress = 100; - public float rotation = 0; public boolean isProgressing; int age = 0; int consumption = 100; @@ -266,10 +265,6 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve if(slots[5] == null || (slots[5] != null && slots[5].getItem() == MachineRecipes.getOutputFromTempate(slots[4]).copy().getItem()) && slots[5].stackSize + MachineRecipes.getOutputFromTempate(slots[4]).copy().stackSize <= slots[5].getMaxStackSize()) { progress++; isProgressing = true; - rotation += 5; - - if(rotation >= 360) - rotation -= 360; if(progress >= maxProgress) { progress = 0; @@ -374,7 +369,7 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve break; } - PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, rotation, isProgressing)); + PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, isProgressing)); PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord)); PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); } diff --git a/com/hbm/tileentity/machine/TileEntityMachineChemplant.java b/com/hbm/tileentity/machine/TileEntityMachineChemplant.java index 3e0f25164..8336c8e6b 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineChemplant.java +++ b/com/hbm/tileentity/machine/TileEntityMachineChemplant.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IFluidAcceptor; @@ -46,7 +47,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve public static final long maxPower = 100000; public int progress; public int maxProgress = 100; - public float rotation = 0; public boolean isProgressing; int age = 0; int consumption = 100; @@ -284,6 +284,8 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve if(!worldObj.isRemote) { + int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); + isProgressing = false; age++; @@ -322,10 +324,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve if(hasSpaceForItems(MachineRecipes.getChemOutputFromTempate(slots[4])) && hasSpaceForFluids(outputs)) { progress++; isProgressing = true; - rotation += 5; - - if(rotation >= 360) - rotation -= 360; if(progress >= maxProgress) { progress = 0; @@ -344,7 +342,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve } else progress = 0; - int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); TileEntity te = null; if(meta == 2) { te = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord); @@ -433,7 +430,22 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve break; } - PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, rotation, isProgressing)); + if(isProgressing) { + if(meta == 2) { + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.375, yCoord + 3, zCoord - 0.625, 0.0, 0.0, 0.0)); + } + if(meta == 3) { + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.625, yCoord + 3, zCoord + 1.625, 0.0, 0.0, 0.0)); + } + if(meta == 4) { + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord - 0.625, yCoord + 3, zCoord + 0.625, 0.0, 0.0, 0.0)); + } + if(meta == 5) { + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 1.625, yCoord + 3, zCoord + 0.375, 0.0, 0.0, 0.0)); + } + } + + PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, isProgressing)); PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord)); PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); }