From 78808b1f5d4d5a8a60431bb10df5e9f554b2e57e Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 7 Feb 2021 23:26:58 +0100 Subject: [PATCH] those writings on the wall --- src/main/java/assets/hbm/lang/de_DE.lang | 18 +- src/main/java/assets/hbm/lang/en_US.lang | 16 +- .../hbm/textures/gui/gui_planner_journal.png | Bin 0 -> 1534 bytes .../assets/hbm/textures/items/heart_fab.png | Bin 0 -> 292 bytes .../textures/items/ingot_chainsteel_hot.png | Bin 0 -> 407 bytes .../assets/hbm/textures/items/journal_bj.png | Bin 0 -> 332 bytes .../hbm/textures/items/journal_silver.png | Bin 0 -> 363 bytes .../assets/hbm/textures/items/scrumpy.png | Bin 0 -> 281 bytes src/main/java/com/hbm/blocks/ModBlocks.java | 3 + .../com/hbm/blocks/generic/BlockWriting.java | 42 +++ src/main/java/com/hbm/config/WorldConfig.java | 2 + .../java/com/hbm/crafting/ArmorRecipes.java | 4 + .../com/hbm/crafting/ConsumableRecipes.java | 2 + .../java/com/hbm/crafting/PowderRecipes.java | 1 + .../hbm/handler/guncfg/GunFatmanFactory.java | 3 +- .../com/hbm/inventory/AssemblerRecipes.java | 11 +- .../gui/GUIScreenTemplateFolder.java | 269 ++++++++++-------- src/main/java/com/hbm/items/ModItems.java | 41 ++- .../com/hbm/items/armor/ItemModInsert.java | 2 +- .../com/hbm/items/armor/ItemModRevive.java | 34 +++ .../com/hbm/items/armor/ItemModTesla.java | 14 + .../items/machine/ItemAssemblyTemplate.java | 23 +- .../com/hbm/items/special/ItemHotDusted.java | 3 +- .../java/com/hbm/items/tool/ItemWandD.java | 2 +- .../com/hbm/items/weapon/ItemGunOSIPR.java | 3 + .../java/com/hbm/lib/HbmChestContents.java | 4 +- src/main/java/com/hbm/lib/HbmWorldGen.java | 9 + src/main/java/com/hbm/lib/RefStrings.java | 2 +- src/main/java/com/hbm/main/ClientProxy.java | 1 + .../java/com/hbm/main/CraftingManager.java | 6 +- src/main/java/com/hbm/main/MainRegistry.java | 2 + .../java/com/hbm/main/ModEventHandler.java | 37 ++- .../entity/projectile/RenderBullet.java | 14 +- .../com/hbm/world/dungeon/AncientTomb.java | 135 ++++++++- src/main/resources/mcmod.info | 2 +- 35 files changed, 546 insertions(+), 159 deletions(-) create mode 100644 src/main/java/assets/hbm/textures/gui/gui_planner_journal.png create mode 100644 src/main/java/assets/hbm/textures/items/heart_fab.png create mode 100644 src/main/java/assets/hbm/textures/items/ingot_chainsteel_hot.png create mode 100644 src/main/java/assets/hbm/textures/items/journal_bj.png create mode 100644 src/main/java/assets/hbm/textures/items/journal_silver.png create mode 100644 src/main/java/assets/hbm/textures/items/scrumpy.png create mode 100644 src/main/java/com/hbm/blocks/generic/BlockWriting.java create mode 100644 src/main/java/com/hbm/items/armor/ItemModRevive.java diff --git a/src/main/java/assets/hbm/lang/de_DE.lang b/src/main/java/assets/hbm/lang/de_DE.lang index b65de2691..a2b3932d8 100644 --- a/src/main/java/assets/hbm/lang/de_DE.lang +++ b/src/main/java/assets/hbm/lang/de_DE.lang @@ -377,7 +377,7 @@ hbmfluid.watz=Giftiger Schlamm hbmfluid.xenon=Xenongas info.coil=Spulenstärke -info.templatefolder=Hergestellt mit Zeichenmappe +info.templatefolder=Hergestellt mit %s info.template_in=Input: info.template_in_p=Input: info.template_out=Output: @@ -1237,6 +1237,7 @@ item.hazmat_plate_red.name=Verbesserte Strahlenschutzbrustplatte item.hazmat_red_kit.name=Lvl 2 Strahlenschutz-Kit item.heart_booster.name=Herzbooster item.heart_container.name=Herzcontainer +item.heart_fab.name=Fab Herz item.heart_piece.name=Herzteil item.hev_battery.name=Anzugs-Batterie item.hev_boots.name=HEV Mark IV Stiefel @@ -1265,6 +1266,7 @@ item.ingot_aluminium.name=Aluminiumbarren item.ingot_asbestos.name=Asbestplatte item.ingot_australium.name=Australiumbarren item.ingot_beryllium.name=Berylliumbarren +item.ingot_chainsteel.name=Schwerer Kettenstahl item.ingot_cobalt.name=Kobaltbarren item.ingot_combine_steel.name=CMB-Stahlbarren item.ingot_copper.name=Industrielles Kupfer @@ -1335,6 +1337,9 @@ item.jetpack_break.name=Bauarbeiter-Raketenrucksack item.jetpack_fly.name=Raketenrucksack item.jetpack_tank.name=Raketenrucksack-Reservetank item.jetpack_vector.name=Schubvektorgesteuerter Raketenrucksack +item.journal_bj.name=Mit Whiskey durchnässtes Notizbuch +item.journal_pip.name=Tagebuch des Überlebenskünstlers +item.journal_silver.name=Notizen des Kontraktor's item.key.name=Schlüssel item.key_fake.name=Gefälschter Schlüssel item.key_kit.name=Schlüssel-Imitationskit @@ -1690,9 +1695,10 @@ item.plan_c.name=Plan C item.plate_advanced_alloy.name=Fortgeschrittene Legierungsplatte item.plate_aluminium.name=Aluminiumplatte item.plate_armor_ajr.name=Eisenbeschlagene Panzerplatte +item.plate_armor_fau.name=Fau-Panzerplatte item.plate_armor_hev.name=Reaktive Panzerplatte item.plate_armor_lunar.name=Lunare Panzerplatte -item.plate_armor_titanium.name=Titanium-Panzerplatte +item.plate_armor_titanium.name=Titan-Panzerplatte item.plate_combine_steel.name=CMB-Stahlplatte item.plate_copper.name=Kupferplatte item.plate_dalekanium.name=Wütendes Metall @@ -1956,6 +1962,7 @@ item.schrabidium_shovel.name=Schrabidiumschaufel item.schrabidium_sword.name=Schrabidiumschwert item.scrap.name=Schrott item.screwdriver.name=Schraubenzieher +item.scrumpy.name=Flasche Scrumpy item.security_boots.name=Sicherheitsstiefel item.security_helmet.name=Sicherheitshelm item.security_legs.name=Sicherheitsbeinschutz @@ -2316,6 +2323,7 @@ tile.brick_compound.name=Verstärkter Verbund tile.brick_concrete.name=Betonziegel tile.brick_concrete_broken.name=Gebrochene Betonziegel tile.brick_concrete_cracked.name=Rissige Betonziegel +tile.brick_concrete_marked.name=Beschriebene Betonziegel tile.brick_concrete_mossy.name=Bemooste Betonziegel tile.brick_dungeon.name=Berzelianitziiegel tile.brick_dungeon_circle.name=Berzelianitkreis @@ -2415,8 +2423,14 @@ tile.fwatz_hatch.name=Watzwerkzugriffsluke tile.fwatz_plasma.name=Destabilisiertes Antischrabidiumplasma tile.fwatz_scaffold.name=Watzwerkstützen tile.fwatz_tank.name=Kühlmitteltank +tile.gas_asbestos.name=Asbestpartikel tile.gas_duct.name=Gasleitung tile.gas_duct_solid.name=Verstärkte Gasleitung +tile.gas_flammable.name=Flammbares Gas +tile.gas_monoxide.name=Koglenmonoxid +tile.gas_radon.name=Radongas +tile.gas_radon_dense.name=Dichtes Radongas +tile.gas_radon_tomb.name=Grabgas tile.geiger.name=Geigerzähler tile.glass_polonium.name=Poloniumglas tile.glass_trinitite.name=Trinity-Glas diff --git a/src/main/java/assets/hbm/lang/en_US.lang b/src/main/java/assets/hbm/lang/en_US.lang index 5a1114ab2..fe9eb3e3a 100644 --- a/src/main/java/assets/hbm/lang/en_US.lang +++ b/src/main/java/assets/hbm/lang/en_US.lang @@ -383,7 +383,7 @@ hbmfluid.watz=Poisonous Mud hbmfluid.xenon=Xenon Gas info.coil=Coil Strength -info.templatefolder=Created with Template Folder +info.templatefolder=Created with %s info.template_in=Input: info.template_in_p=Inputs: info.template_out=Output: @@ -1243,6 +1243,7 @@ item.hazmat_plate_red.name=Advanced Hazmat Chestplate item.hazmat_red_kit.name=Advanced Hazmat Kit item.heart_booster.name=Heart Booster item.heart_container.name=Heart Container +item.heart_fab.name=Fab Heart item.heart_piece.name=Heart Piece item.hev_battery.name=Suit Battery item.hev_boots.name=HEV Mark IV Boots @@ -1271,6 +1272,7 @@ item.ingot_aluminium.name=Aluminium Ingot item.ingot_asbestos.name=Asbestos Sheet item.ingot_australium.name=Australium Ingot item.ingot_beryllium.name=Beryllium Ingot +item.ingot_chainsteel.name=Heavy Chainsteel item.ingot_cobalt.name=Cobalt Ingot item.ingot_combine_steel.name=CMB Steel Ingot item.ingot_copper.name=Industrial Grade Copper @@ -1341,6 +1343,9 @@ item.jetpack_break.name=Builder's Jetpack item.jetpack_fly.name=Jetpack item.jetpack_tank.name=Jetpack Reserve Fuel Tank item.jetpack_vector.name=Vectored Jetpack +item.journal_bj.name=Whiskey Drenched Notebook +item.journal_pip.name=Survivalist's Journal +item.journal_silver.name=Contractor's Notes item.key.name=Key item.key_fake.name=Counterfeit Key item.key_kit.name=Key Imitation Kit @@ -1696,6 +1701,7 @@ item.plan_c.name=Plan C item.plate_advanced_alloy.name=Advanced Alloy Plate item.plate_aluminium.name=Aluminium Plate item.plate_armor_ajr.name=Iron-Shod Armor Plating +item.plate_armor_fau.name=Fau Armor Plating item.plate_armor_hev.name=Reactive Armor Plating item.plate_armor_lunar.name=Lunar Plating item.plate_armor_titanium.name=Titanium Armor Plate @@ -1962,6 +1968,7 @@ item.schrabidium_shovel.name=Schrabidium Shovel item.schrabidium_sword.name=Schrabidium Sword item.scrap.name=Scrap item.screwdriver.name=Screwdriver +item.scrumpy.name=Bottle of Scrumpy item.security_boots.name=Security Boots item.security_helmet.name=Security Helmet item.security_legs.name=Security Leggings @@ -2322,6 +2329,7 @@ tile.brick_compound.name=Compound Mesh tile.brick_concrete.name=Concrete Bricks tile.brick_concrete_broken.name=Broken Concrete Bricks tile.brick_concrete_cracked.name=Cracked Concrete Bricks +tile.brick_concrete_marked.name=Marked Concrete Bricks tile.brick_concrete_mossy.name=Mossy Concrete Bricks tile.brick_dungeon.name=Berzelianite Bricks tile.brick_dungeon_circle.name=Berzelianite Cirlce @@ -2421,8 +2429,14 @@ tile.fwatz_hatch.name=Fusionary Watz Plant Access Hatch tile.fwatz_plasma.name=Destabilized Antischrabidium Plasma tile.fwatz_scaffold.name=Fusionary Watz Plant Structural Support tile.fwatz_tank.name=Regenerative Coolant Fluid Tank +tile.gas_asbestos.name=Airborne Asbestos Particles tile.gas_duct.name=Gas Pipe tile.gas_duct_solid.name=Coated Gas Pipe +tile.gas_flammable.name=Flammable Gas +tile.gas_monoxide.name=Carbon Monoxide +tile.gas_radon.name=Radon Gas +tile.gas_radon_dense.name=Dense Radon Gas +tile.gas_radon_tomb.name=Tomb Gas tile.geiger.name=Geiger Counter tile.glass_polonium.name=Polonium Glass tile.glass_trinitite.name=Trinity Glass diff --git a/src/main/java/assets/hbm/textures/gui/gui_planner_journal.png b/src/main/java/assets/hbm/textures/gui/gui_planner_journal.png new file mode 100644 index 0000000000000000000000000000000000000000..36b363e8f08afda1cafdab35ceacde5ef71a957d GIT binary patch literal 1534 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6%N?Bp530R%N1DIE+9tXn-@ z978JRyuG{8FWOV0?O|f;lW9t)TrVuWGl{!k=UnS8yrQv7VjPx~tjtidDv!Rj^rUKm zvfibjjZ-f&S|;?fpE>j0CR9oAf7p`Gx0;{#^gsK&`8U(tU*F!&SL-jX{JHq#<3E2Y ztFJt1ymz8dbLpMCf9<|}ZkT&EO?~NeEsoE(TUqj_WV0s zRJrxDecal-?Z3|7|MvWhQFe6qQP;DVA9e2M`^(aBSdf83jX}VNL16}ig8^eh0u#eQ z7KSEH1{Pr?i4E<$8Lw}5d6#v&KK%EOw3$a=S8_O<)t#w)H!dse{^qC`AM5_r%I^Q8 zY_PAEpE=Un_U-FAOpFV%_4ih1eB@jF^zj~ZCWn^g>Ks?+G=zF-K7SrB_xJCwU)f)a ztN3fU4t$7`mH+nTk$fYA!Iqc$-?HMrdTT!Y{QSS%zdOHI|C^%9aCp|fPwVyn&EoKh z|9M^fzlPukz6QnIT|csOcKvWyV&F-y`uP6y$9rEM<$q;WdEYy?A&u8C`|V5Z`nSpU zwNK?sw=V(;mD+b#O=I9m-F5H&^T+#NR@EQr|9_38;h~T6hV%daWwI=jXYO-hkeF1? zbX$<2ZL20z_tB&09B+s;e*UcQ%;Lx(aqCO+f!ceVKK5)f4-dr)Gqi0#@3vs2pgGe` zE*}=b8$Jv#Zkb7!MCCq`EHs{=%E0oOuVLNZr+J43%XPUJoC`ml&(mR)n02{fo;m~1 z$+8D;IT)NH_12rs`xm_VcmCy<_KWul3ox`jo7eDM_U!ZY@8#wDXV)4s?P)!IT0Ygx z`sSllU9)YGq38zzUnaINOWiX9CoFsCrFnu&AR$m=T#&V?v#nJ z1D<5hG%A#wY*fg#5IC~tU3%boA&le<)%1pCiFX;(wnX&>k$2B8ngl+Qz6U#|1f^}B94=c_{P}f;o&E0mtBSyq8W$*# Z_|Lr9&+o>TlJZQD8c$b0mvv4FO#pYBJqZ8+ literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/heart_fab.png b/src/main/java/assets/hbm/textures/items/heart_fab.png new file mode 100644 index 0000000000000000000000000000000000000000..f9a85d90ea3b670685cc9cf1f0dc819f1491bf73 GIT binary patch literal 292 zcmV+<0o(qGP)&R4Gyh{B@N4w!h3HaDBOZO+GXoi7$|kgX86utJ04)K! zA>`T*&;ro6g|=)+$VtfY2?4moLwrIKa+d1MR96l2hJcM!6*jbPk_$>pEEv2I#ZbA^E0JyEd>;_!#f|OCZrjE|1&}kWh z0Q>+fiF5H132X~4cVK!QZuX$CnnLH>pcH5gN}4J)SmxD6U|Hr;EIHXSQWa$wrV>k= zsyhWrf$y8~8fOLw1c)f5Fg+=8j_;D;=JxACO_U#n9v{|>41yP!PM|@A1`Gwx(L)#1 z`R&O@A53Wmaxl~n^(M~M>$lLCf>;uRKS6&hJ^&cpjO|BpExrH%002ovPDHLkV1mC? BqtE~V literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/journal_bj.png b/src/main/java/assets/hbm/textures/items/journal_bj.png new file mode 100644 index 0000000000000000000000000000000000000000..5d871b675dd0500b90a4351fbf0e2e923655ab6f GIT binary patch literal 332 zcmV-S0ki&zP)8Y`_<1H%@TQQB~Evf8Z*%S+*@@+j{=GUjI)3;AXe;iG3UsiVEDOsZR_A zL;kCSDU9D`Qb1KvRf?kUYYdZJNRpos$@ARDA~J9>a4^?45&64=@vs0qKW^CEN1Tqh ziU@B{ci-f20HCgGu2(Dccx3zVLRpsaQSPzdf6#Ru08P`dTrT-^@1&>p&N%?^A1JIl eEGzs>7vl?JF=BXEwD=YP0000qfunZ;=M&C~1Y z-ww9hfFwx(h@uEx*ZF*tXqpC;1(ac0%-no{igg#uDh|`p*aOuUU4bD1ua^J-002ov JPDHLkV1kr_mstP+ literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/scrumpy.png b/src/main/java/assets/hbm/textures/items/scrumpy.png new file mode 100644 index 0000000000000000000000000000000000000000..63a36095ab43a9005c9dbfd3947f59c75091a1b8 GIT binary patch literal 281 zcmV+!0p|XRP)Df%Cu8Wwz#|F|U>xVRY@7#LpTRKtYN07>?b z4By^7!KVbj0mJ~D2KZac!u_tRAc!*@uo~cRE&HE`la=Ai_umXWoGc97oGdsE!RrM% zH46qw6?1$_umgW<+5gwh?fif3+|K__wub+&o!j}JEEnYDS1?SO*n!tFMqDo7;bdhH zk~L=d@a;Fl?Mp`)zJCA1aQVS|4E3~&Mq&Zpr2OdC35KuV|KK$MYZx#vK*Hhc_dg6@ fzW>4Lf2sfgBO^p_+Mal000000NkvXXu0mjfF1dOz literal 0 HcmV?d00001 diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 3de144e2d..095c8fa89 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -214,6 +214,7 @@ public class ModBlocks { public static Block brick_concrete_mossy; public static Block brick_concrete_cracked; public static Block brick_concrete_broken; + public static Block brick_concrete_marked; public static Block brick_obsidian; public static Block brick_light; public static Block brick_compound; @@ -1089,6 +1090,7 @@ public class ModBlocks { brick_concrete_mossy = new BlockGeneric(Material.rock).setBlockName("brick_concrete_mossy").setCreativeTab(MainRegistry.blockTab).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).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).setHardness(15.0F).setResistance(1500.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_broken"); + brick_concrete_marked = new BlockWriting(Material.rock, RefStrings.MODID + ":brick_concrete").setBlockName("brick_concrete_marked").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(1500.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_marked"); 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).setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_light"); brick_compound = new BlockGeneric(Material.rock).setBlockName("brick_compound").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(10000.0F).setBlockTextureName(RefStrings.MODID + ":brick_compound"); @@ -1830,6 +1832,7 @@ public class ModBlocks { 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_concrete_marked, brick_concrete_marked.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/src/main/java/com/hbm/blocks/generic/BlockWriting.java b/src/main/java/com/hbm/blocks/generic/BlockWriting.java new file mode 100644 index 000000000..ab855ce58 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockWriting.java @@ -0,0 +1,42 @@ +package com.hbm.blocks.generic; + +import com.hbm.blocks.machine.BlockPillar; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.ChatStyle; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class BlockWriting extends BlockPillar { + + public BlockWriting(Material mat, String top) { + super(mat, top); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) { + return true; + + } else if(!player.isSneaking()) { + + ChatStyle red = new ChatStyle().setColor(EnumChatFormatting.RED); + player.addChatMessage(new ChatComponentText("You should not have come here.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("This is not a place of honor. No great deed is commemorated here.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("Nothing of value is here.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("What is here is dangerous and repulsive.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("We considered ourselves a powerful culture. We harnessed the hidden fire, and used it for our own purposes.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("Then we saw the fire could burn within living things, unnoticed until it destroyed them.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("And we were afraid.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("We built great tombs to hold the fire for one hundred thousand years, after which it would no longer kill.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("If this place is opened, the fire will not be isolated from the world, and we will have failed to protect you.").setChatStyle(red)); + player.addChatMessage(new ChatComponentText("Leave this place and never come back.").setChatStyle(red)); + return true; + + } else { + return false; + } + } +} diff --git a/src/main/java/com/hbm/config/WorldConfig.java b/src/main/java/com/hbm/config/WorldConfig.java index 403444fa7..356c353bd 100644 --- a/src/main/java/com/hbm/config/WorldConfig.java +++ b/src/main/java/com/hbm/config/WorldConfig.java @@ -53,6 +53,7 @@ public class WorldConfig { public static int capsuleStructure = 100; public static int arcticStructure = 500; public static int jungleStructure = 2000; + public static int pyramidStructure = 2000; public static int broadcaster = 5000; public static int minefreq = 64; @@ -119,6 +120,7 @@ public class WorldConfig { capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100); arcticStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.22_arcticVaultSpawn", "Spawn artic code vault on every nTH chunk", 500); jungleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.23_jungleDungeonSpawn", "Spawn jungle dungeon on every nTH chunk", 2000); + pyramidStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.24_pyramidSpawn", "Spawn pyramid on every nTH chunk", 2000); final String CATEGORY_METEOR = "05_meteors"; Property propMeteorStrikeChance = config.get(CATEGORY_METEOR, "5.00_meteorStrikeChance", 20 * 60 * 60 * 5); diff --git a/src/main/java/com/hbm/crafting/ArmorRecipes.java b/src/main/java/com/hbm/crafting/ArmorRecipes.java index 1fe6f3666..489f14183 100644 --- a/src/main/java/com/hbm/crafting/ArmorRecipes.java +++ b/src/main/java/com/hbm/crafting/ArmorRecipes.java @@ -73,6 +73,10 @@ public class ArmorRecipes { GameRegistry.addRecipe(new ItemStack(ModItems.hev_plate, 1), new Object[] { "MPM", "IBI", "PPP", 'P', ModItems.plate_armor_hev, 'B', ModItems.titanium_plate, 'I', ModItems.ingot_polymer, 'M', ModItems.motor_desh }); GameRegistry.addRecipe(new ItemStack(ModItems.hev_legs, 1), new Object[] { "MPM", "IBI", "P P", 'P', ModItems.plate_armor_hev, 'B', ModItems.titanium_legs, 'I', ModItems.ingot_polymer, 'M', ModItems.motor_desh }); GameRegistry.addRecipe(new ItemStack(ModItems.hev_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_hev, 'B', ModItems.titanium_boots }); + GameRegistry.addRecipe(new ItemStack(ModItems.fau_helmet, 1), new Object[] { "PWP", "PBP", "FSF", 'P', ModItems.plate_armor_fau, 'W', new ItemStack(Blocks.wool, 1, 14), 'B', ModItems.starmetal_helmet, 'F', ModItems.gas_mask_filter, 'S', ModItems.pipes_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.fau_plate, 1), new Object[] { "MCM", "PBP", "PSP", 'M', ModItems.motor_desh, 'C', ModItems.demon_core_closed, 'P', ModItems.plate_armor_fau, 'B', ModItems.starmetal_plate, 'S', ModBlocks.ancient_scrap }); + GameRegistry.addRecipe(new ItemStack(ModItems.fau_legs, 1), new Object[] { "MPM", "PBP", "PDP", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_fau, 'B', ModItems.starmetal_legs, 'D', ModItems.billet_polonium }); + GameRegistry.addRecipe(new ItemStack(ModItems.fau_boots, 1), new Object[] { "PDP", "PBP", 'P', ModItems.plate_armor_fau, 'D', ModItems.billet_polonium, 'B', ModItems.starmetal_boots }); //Euphemium armor GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.plate_euphemium }); diff --git a/src/main/java/com/hbm/crafting/ConsumableRecipes.java b/src/main/java/com/hbm/crafting/ConsumableRecipes.java index 9439e896a..56d52104b 100644 --- a/src/main/java/com/hbm/crafting/ConsumableRecipes.java +++ b/src/main/java/com/hbm/crafting/ConsumableRecipes.java @@ -158,8 +158,10 @@ public class ConsumableRecipes { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.industrial_magnet, 1), new Object[] { "SMS", " B ", "SMS", 'S', "ingotSteel", 'M', ModItems.horseshoe_magnet, 'B', ModBlocks.fusion_conductor })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.heart_container, 1), new Object[] { "HAH", "ACA", "HAH", 'H', ModItems.heart_piece, 'A', "ingotAluminum", 'C', ModItems.coin_creeper })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.heart_booster, 1), new Object[] { "GHG", "MCM", "GHG", 'G', "ingotGold", 'H', ModItems.heart_container, 'M', ModItems.morning_glory, 'C', ModItems.coin_maskman })); + GameRegistry.addRecipe(new ItemStack(ModItems.heart_fab, 1), new Object[] { "GHG", "MCM", "GHG", 'G', ModItems.billet_polonium, 'H', ModItems.heart_booster, 'M', ModItems.canteen_fab, 'C', ModItems.coin_worm }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ink, 1), new Object[] { "FPF", "PIP", "FPF", 'F', new ItemStack(Blocks.red_flower, 1, OreDictionary.WILDCARD_VALUE), 'P', ModItems.armor_polish, 'I', "dyeBlack" })); GameRegistry.addRecipe(new ItemStack(ModItems.bathwater_mk2, 1), new Object[] { "MWM", "WBW", "MWM", 'M', ModItems.bottle_mercury, 'W', ModItems.nuclear_waste, 'B', ModItems.bathwater }); + GameRegistry.addRecipe(new ItemStack(ModItems.back_tesla, 1), new Object[] { "DGD", "GTG", "DGD", 'D', ModItems.ducttape, 'G', ModItems.wire_gold, 'T', ModBlocks.tesla }); //Stealth boy GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Item.getItemFromBlock(Blocks.stone_button), 'L', Items.leather, 'I', "ingotSteel", 'C', ModItems.circuit_red_copper })); diff --git a/src/main/java/com/hbm/crafting/PowderRecipes.java b/src/main/java/com/hbm/crafting/PowderRecipes.java index 5bd682f4c..27c7f5c1a 100644 --- a/src/main/java/com/hbm/crafting/PowderRecipes.java +++ b/src/main/java/com/hbm/crafting/PowderRecipes.java @@ -17,6 +17,7 @@ public class PowderRecipes { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_power, 5), new Object[] { "dustRedstone", "dustGlowstone", "dustDiamond", "dustNeptunium", "dustMagnetizedTungsten" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ballistite, 3), new Object[] { Items.gunpowder, "dustSaltpeter", Items.sugar })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_steel_dusted, 1), new Object[] { "ingotSteel", "dustCoal" })); //Gunpowder GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSaltpeter", Items.coal })); diff --git a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java index af2547f7a..8348012fc 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java @@ -460,7 +460,8 @@ public class GunFatmanFactory { .addAttrib(ExAttrib.NOPARTICLE) .addAttrib(ExAttrib.NOSOUND) .addAttrib(ExAttrib.NODROP) - .addAttrib(ExAttrib.NOHURT); + .addAttrib(ExAttrib.NOHURT) + .overrideResolution(64); exp.doExplosionA(); exp.doExplosionB(false); diff --git a/src/main/java/com/hbm/inventory/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/AssemblerRecipes.java index 8ba327a39..48eae55a5 100644 --- a/src/main/java/com/hbm/inventory/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/AssemblerRecipes.java @@ -45,7 +45,7 @@ public class AssemblerRecipes { public static HashMap recipes = new HashMap(); public static HashMap time = new HashMap(); public static List recipeList = new ArrayList(); - public static HashSet hidden = new HashSet(); + public static HashMap> hidden = new HashMap(); /** * Pre-Init phase: Finds the recipe config (if exists) and checks if a template is present, if not it generates one. @@ -623,7 +623,14 @@ public class AssemblerRecipes { /// HIDDEN /// - hidden.add(new ComparableStack(ModBlocks.machine_radgen, 1)); + hidden.put(new ComparableStack(ModBlocks.machine_radgen, 1), new HashSet() {{ add(ModItems.journal_pip); }}); + hidden.put(new ComparableStack(ModBlocks.nuke_fstbmb, 1), new HashSet() {{ add(ModItems.journal_pip); add(ModItems.journal_bj); }}); + hidden.put(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new HashSet() {{ add(ModItems.journal_pip); }}); + hidden.put(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new HashSet() {{ add(ModItems.journal_pip); }}); + hidden.put(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new HashSet() {{ add(ModItems.journal_bj); }}); + hidden.put(new ComparableStack(ModItems.sat_gerald, 1), new HashSet() {{ add(ModItems.journal_bj); }}); + hidden.put(new ComparableStack(ModItems.missile_soyuz, 1), new HashSet() {{ add(ModItems.journal_bj); }}); + hidden.put(new ComparableStack(ModItems.missile_soyuz_lander, 1), new HashSet() {{ add(ModItems.journal_bj); }}); } private static void makeRecipe(ComparableStack out, AStack[] in, int duration) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIScreenTemplateFolder.java b/src/main/java/com/hbm/inventory/gui/GUIScreenTemplateFolder.java index 59ebb316b..a6dec6bb7 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIScreenTemplateFolder.java +++ b/src/main/java/com/hbm/inventory/gui/GUIScreenTemplateFolder.java @@ -3,12 +3,16 @@ package com.hbm.inventory.gui; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Map.Entry; import org.lwjgl.opengl.GL11; +import com.hbm.blocks.ModBlocks; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.inventory.AssemblerRecipes; import com.hbm.inventory.MachineRecipes; +import com.hbm.inventory.RecipesCommon; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemCassette; import com.hbm.items.machine.ItemChemistryTemplate; @@ -21,6 +25,7 @@ import com.hbm.packet.PacketDispatcher; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; @@ -29,104 +34,119 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; public class GUIScreenTemplateFolder extends GuiScreen { - - protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_planner.png"); - protected int xSize = 176; - protected int ySize = 229; - protected int guiLeft; - protected int guiTop; - int currentPage = 0; - List stacks = new ArrayList(); - List buttons = new ArrayList(); - - public GUIScreenTemplateFolder(EntityPlayer player) { - //Stamps - for(Item i : MachineRecipes.stamps_plate) - stacks.add(new ItemStack(i)); - for(Item i : MachineRecipes.stamps_wire) - stacks.add(new ItemStack(i)); - for(Item i : MachineRecipes.stamps_circuit) - stacks.add(new ItemStack(i)); - //Tracks - for(int i = 1; i < ItemCassette.TrackType.values().length; i++) - stacks.add(new ItemStack(ModItems.siren_track, 1, i)); - //Fluid IDs - for(int i = 1; i < FluidType.values().length; i++) - stacks.add(new ItemStack(ModItems.fluid_identifier, 1, i)); - //Assembly Templates - for(int i = 0; i < AssemblerRecipes.recipeList.size(); i++) - //if(!AssemblerRecipes.hidden.contains(AssemblerRecipes.recipeList.get(i))) - stacks.add(new ItemStack(ModItems.assembly_template, 1, i)); - //Chemistry Templates - for(int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; i++) - stacks.add(new ItemStack(ModItems.chemistry_template, 1, i)); - } - - int getPageCount() { - return (int)Math.ceil((stacks.size() - 1) / (5 * 7)); - } - - public void updateScreen() { - if(currentPage < 0) - currentPage = 0; - if(currentPage > getPageCount()) - currentPage = getPageCount(); - } - - public void drawScreen(int mouseX, int mouseY, float f) - { - this.drawDefaultBackground(); - this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY); - GL11.glDisable(GL11.GL_LIGHTING); - this.drawGuiContainerForegroundLayer(mouseX, mouseY); - GL11.glEnable(GL11.GL_LIGHTING); - } - - public void initGui() - { - super.initGui(); - this.guiLeft = (this.width - this.xSize) / 2; - this.guiTop = (this.height - this.ySize) / 2; + protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_planner.png"); + protected static final ResourceLocation texture_journal = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_planner_journal.png"); + private boolean isJournal = false; + protected int xSize = 176; + protected int ySize = 229; + protected int guiLeft; + protected int guiTop; + int currentPage = 0; + List stacks = new ArrayList(); + List buttons = new ArrayList(); + + public GUIScreenTemplateFolder(EntityPlayer player) { + + if(player.getHeldItem() == null) + return; + + if(player.getHeldItem().getItem() == ModItems.template_folder) { + + // Stamps + for(Item i : MachineRecipes.stamps_plate) + stacks.add(new ItemStack(i)); + for(Item i : MachineRecipes.stamps_wire) + stacks.add(new ItemStack(i)); + for(Item i : MachineRecipes.stamps_circuit) + stacks.add(new ItemStack(i)); + // Tracks + for(int i = 1; i < ItemCassette.TrackType.values().length; i++) + stacks.add(new ItemStack(ModItems.siren_track, 1, i)); + // Fluid IDs + for(int i = 1; i < FluidType.values().length; i++) + stacks.add(new ItemStack(ModItems.fluid_identifier, 1, i)); + // Assembly Templates + for(int i = 0; i < AssemblerRecipes.recipeList.size(); i++) + if(AssemblerRecipes.hidden.get(AssemblerRecipes.recipeList.get(i)) == null) + stacks.add(new ItemStack(ModItems.assembly_template, 1, i)); + // Chemistry Templates + for(int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; i++) + stacks.add(new ItemStack(ModItems.chemistry_template, 1, i)); + } else { + + for(int i = 0; i < AssemblerRecipes.recipeList.size(); i++) { + + if(AssemblerRecipes.hidden.get(AssemblerRecipes.recipeList.get(i)) != null && + AssemblerRecipes.hidden.get(AssemblerRecipes.recipeList.get(i)).contains(player.getHeldItem().getItem())) + stacks.add(new ItemStack(ModItems.assembly_template, 1, i)); + } + + isJournal = true; + } + } + + int getPageCount() { + return (int) Math.ceil((stacks.size() - 1) / (5 * 7)); + } + + public void updateScreen() { + if(currentPage < 0) + currentPage = 0; + if(currentPage > getPageCount()) + currentPage = getPageCount(); + } + + public void drawScreen(int mouseX, int mouseY, float f) { + this.drawDefaultBackground(); + this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY); + GL11.glDisable(GL11.GL_LIGHTING); + this.drawGuiContainerForegroundLayer(mouseX, mouseY); + GL11.glEnable(GL11.GL_LIGHTING); + } + + public void initGui() { + super.initGui(); + this.guiLeft = (this.width - this.xSize) / 2; + this.guiTop = (this.height - this.ySize) / 2; + + updateButtons(); + } - updateButtons(); - } - @Override public boolean doesGuiPauseGame() { return false; } - - protected void updateButtons() { - - if(!buttons.isEmpty()) - buttons.clear(); - - for(int i = currentPage * 35; i < Math.min(currentPage * 35 + 35, stacks.size()); i++) { - buttons.add(new FolderButton(guiLeft + 25 + (27 * (i % 5)), guiTop + 26 + (27 * (int)Math.floor((i / 5D))) - currentPage * 27 * 7, stacks.get(i))); - } - if(currentPage != 0) - buttons.add(new FolderButton(guiLeft + 25 - 18, guiTop + 26 + (27 * 3), 1, "Previous")); - if(currentPage != getPageCount()) - buttons.add(new FolderButton(guiLeft + 25 + (27 * 4) + 18, guiTop + 26 + (27 * 3), 2, "Next")); - } + protected void updateButtons() { + + if(!buttons.isEmpty()) + buttons.clear(); + + for(int i = currentPage * 35; i < Math.min(currentPage * 35 + 35, stacks.size()); i++) { + buttons.add(new FolderButton(guiLeft + 25 + (27 * (i % 5)), guiTop + 26 + (27 * (int) Math.floor((i / 5D))) - currentPage * 27 * 7, stacks.get(i))); + } + + if(currentPage != 0) + buttons.add(new FolderButton(guiLeft + 25 - 18, guiTop + 26 + (27 * 3), 1, "Previous")); + if(currentPage != getPageCount()) + buttons.add(new FolderButton(guiLeft + 25 + (27 * 4) + 18, guiTop + 26 + (27 * 3), 2, "Next")); + } + + protected void mouseClicked(int i, int j, int k) { + try { + for(FolderButton b : buttons) + if(b.isMouseOnButton(i, j)) + b.executeAction(); + } catch(Exception ex) { + updateButtons(); + } + } - protected void mouseClicked(int i, int j, int k) { - try { - for(FolderButton b : buttons) - if(b.isMouseOnButton(i, j)) - b.executeAction(); - } catch (Exception ex) { - updateButtons(); - } - } - protected void drawGuiContainerForegroundLayer(int i, int j) { - this.fontRendererObj.drawString(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1)), - guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1))) / 2, guiTop + 10, 4210752); - + this.fontRendererObj.drawString(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1)), guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1))) / 2, guiTop + 10, isJournal ? 4210752 : 0xffffff); + for(FolderButton b : buttons) if(b.isMouseOnButton(i, j)) b.drawString(i, j); @@ -134,7 +154,12 @@ public class GUIScreenTemplateFolder extends GuiScreen { protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + + if(!isJournal) + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + else + Minecraft.getMinecraft().getTextureManager().bindTexture(texture_journal); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); for(FolderButton b : buttons) @@ -142,32 +167,30 @@ public class GUIScreenTemplateFolder extends GuiScreen { for(FolderButton b : buttons) b.drawIcon(b.isMouseOnButton(i, j)); } - - protected void keyTyped(char p_73869_1_, int p_73869_2_) - { - if (p_73869_2_ == 1 || p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode()) - { - this.mc.thePlayer.closeScreen(); - } - - } - + + protected void keyTyped(char p_73869_1_, int p_73869_2_) { + if(p_73869_2_ == 1 || p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode()) { + this.mc.thePlayer.closeScreen(); + } + + } + class FolderButton { - + int xPos; int yPos; - //0: regular, 1: prev, 2: next + // 0: regular, 1: prev, 2: next int type; String info; ItemStack stack; - + public FolderButton(int x, int y, int t, String i) { xPos = x; yPos = y; type = t; info = i; } - + public FolderButton(int x, int y, ItemStack stack) { xPos = x; yPos = y; @@ -175,22 +198,30 @@ public class GUIScreenTemplateFolder extends GuiScreen { info = stack.getDisplayName(); this.stack = stack.copy(); } - + public void updateButton(int mouseX, int mouseY) { } - + public boolean isMouseOnButton(int mouseX, int mouseY) { return xPos <= mouseX && xPos + 18 > mouseX && yPos < mouseY && yPos + 18 >= mouseY; } - + public void drawButton(boolean b) { - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + + if(!isJournal) + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + else + Minecraft.getMinecraft().getTextureManager().bindTexture(texture_journal); + drawTexturedModalRect(xPos, yPos, b ? 176 + 18 : 176, type == 1 ? 18 : (type == 2 ? 36 : 0), 18, 18); } - + public void drawIcon(boolean b) { try { - RenderHelper.disableStandardItemLighting(); + RenderHelper.enableGUIStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)240 / 1.0F, (float)240 / 1.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); if(stack != null) { if(stack.getItem() == ModItems.assembly_template) itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), AssemblerRecipes.getOutputFromTempate(stack), xPos + 1, yPos + 1); @@ -199,24 +230,22 @@ public class GUIScreenTemplateFolder extends GuiScreen { else itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), stack, xPos + 1, yPos + 1); } - } catch(Exception x) { } + GL11.glEnable(GL11.GL_LIGHTING); + } catch(Exception x) { + } } - + public void drawString(int x, int y) { if(info == null || info.isEmpty()) return; - String s = info; if(stack != null) { - if(stack.getItem() instanceof ItemFluidIdentifier) - s += (": " + I18n.format(FluidType.getEnum(stack.getItemDamage()).getUnlocalizedName())); - else if(stack.getItem() instanceof ItemCassette) - s = TrackType.getEnum(stack.getItemDamage()).getTrackTitle(); + GUIScreenTemplateFolder.this.renderToolTip(stack, x, y); + } else { + func_146283_a(Arrays.asList(new String[] { info }), x, y); } - - func_146283_a(Arrays.asList(new String[] { s }), x, y); } - + public void executeAction() { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); if(type == 0) { @@ -231,7 +260,7 @@ public class GUIScreenTemplateFolder extends GuiScreen { updateButtons(); } } - + } } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index a4c80b914..93264a925 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -223,11 +223,13 @@ public class ModItems { public static Item ingot_meteorite_forged; public static Item blade_meteorite; public static Item ingot_steel_dusted; + public static Item ingot_chainsteel; public static Item plate_armor_titanium; public static Item plate_armor_ajr; public static Item plate_armor_hev; public static Item plate_armor_lunar; + public static Item plate_armor_fau; public static Item solid_fuel; public static Item rocket_fuel; @@ -958,6 +960,8 @@ public class ModItems { public static Item template_folder; public static Item journal_pip; + public static Item journal_bj; + public static Item journal_silver; public static Item assembly_template; public static Item chemistry_template; public static Item chemistry_icon; @@ -1856,7 +1860,9 @@ public class ModItems { public static Item heart_piece; public static Item heart_container; public static Item heart_booster; + public static Item heart_fab; public static Item wd40; + public static Item scrumpy; public static Item hazmat_helmet; public static Item hazmat_plate; @@ -2280,11 +2286,13 @@ public class ModItems { ingot_meteorite_forged = new ItemHot(200).setUnlocalizedName("ingot_meteorite_forged").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_meteorite_forged"); blade_meteorite = new ItemHot(200).setUnlocalizedName("blade_meteorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":blade_meteorite"); ingot_steel_dusted = new ItemHotDusted(200).setUnlocalizedName("ingot_steel_dusted").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_steel_dusted"); + ingot_chainsteel = new ItemHot(100).setUnlocalizedName("ingot_chainsteel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_chainsteel"); plate_armor_titanium = new Item().setUnlocalizedName("plate_armor_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_titanium"); plate_armor_ajr = new Item().setUnlocalizedName("plate_armor_ajr").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_ajr"); plate_armor_hev = new Item().setUnlocalizedName("plate_armor_hev").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_hev"); plate_armor_lunar = new Item().setUnlocalizedName("plate_armor_lunar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_lunar"); + plate_armor_fau = new Item().setUnlocalizedName("plate_armor_fau").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_fau"); solid_fuel = new Item().setUnlocalizedName("solid_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel"); rocket_fuel = new Item().setUnlocalizedName("rocket_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rocket_fuel"); @@ -2808,7 +2816,9 @@ public class ModItems { heart_piece = new ItemModHealth(5F).setUnlocalizedName("heart_piece").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_piece"); heart_container = new ItemModHealth(20F).setUnlocalizedName("heart_container").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_container"); heart_booster = new ItemModHealth(40F).setUnlocalizedName("heart_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_booster"); + heart_fab = new ItemModHealth(60F).setUnlocalizedName("heart_fab").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_fab"); wd40 = new ItemModWD40().setUnlocalizedName("wd40").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":wd40"); + scrumpy = new ItemModRevive(1).setUnlocalizedName("scrumpy").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":scrumpy"); can_empty = new Item().setUnlocalizedName("can_empty").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_empty"); can_smart = new ItemEnergy().setUnlocalizedName("can_smart").setContainerItem(ModItems.can_empty).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_smart"); @@ -3821,6 +3831,8 @@ public class ModItems { template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":template_folder"); journal_pip = new ItemTemplateFolder().setUnlocalizedName("journal_pip").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_pip"); + journal_bj = new ItemTemplateFolder().setUnlocalizedName("journal_bj").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_bj"); + journal_silver = new ItemTemplateFolder().setUnlocalizedName("journal_silver").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_silver"); assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":assembly_template"); chemistry_template = new ItemChemistryTemplate().setUnlocalizedName("chemistry_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":chemistry_template"); chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null); @@ -3994,23 +4006,22 @@ public class ModItems { jackt2 = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2"); ArmorMaterial aMatFau = EnumHelper.addArmorMaterial("HBM_DIGAMMA", 150, new int[] { 3, 8, 6, 3 }, 100); - aMatFau.customCraftingMaterial = ModItems.nothing; - fau_helmet = new ArmorDigamma(aMatFau, 7, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).setMod(0.25F).setCap(4.0F).setThreshold(2.0F) - .addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1)) - .addEffect(new PotionEffect(Potion.jump.id, 20, 0)) - .setBlastProtection(0.1F) - .setMod(0.1F) + aMatFau.customCraftingMaterial = ModItems.plate_armor_fau; + fau_helmet = new ArmorDigamma(aMatFau, 7, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).setMod(0.25F).setCap(4.0F).setThreshold(2.0F) + .addEffect(new PotionEffect(Potion.jump.id, 20, 1)) + .setBlastProtection(0.05F) + .setMod(0.05F) .setHasGeigerSound(true) - .setHasCustomGeiger(true) .enableThermalSight(true) + .setHasHardLanding(true) .setStep("hbm:step.metal") .setJump("hbm:step.iron_jump") .setFall("hbm:step.iron_land") - .addResistance("fall", 0.5F) + .addResistance("fall", 0.05F) .setFireproof(true).setUnlocalizedName("fau_helmet").setTextureName(RefStrings.MODID + ":fau_helmet"); - fau_plate = new ArmorDigamma(aMatFau, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_plate").setTextureName(RefStrings.MODID + ":fau_plate"); - fau_legs = new ArmorDigamma(aMatFau, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs"); - fau_boots = new ArmorDigamma(aMatFau, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots"); + fau_plate = new ArmorDigamma(aMatFau, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_plate").setTextureName(RefStrings.MODID + ":fau_plate"); + fau_legs = new ArmorDigamma(aMatFau, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs"); + fau_boots = new ArmorDigamma(aMatFau, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots"); jackt = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt").setTextureName(RefStrings.MODID + ":jackt"); jackt2 = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2"); @@ -4557,7 +4568,8 @@ public class ModItems { GameRegistry.registerItem(ingot_electronium, ingot_electronium.getUnlocalizedName()); //Meteorite Ingots - //GameRegistry.registerItem(ingot_steel_dusted, ingot_steel_dusted.getUnlocalizedName()); + GameRegistry.registerItem(ingot_steel_dusted, ingot_steel_dusted.getUnlocalizedName()); + GameRegistry.registerItem(ingot_chainsteel, ingot_chainsteel.getUnlocalizedName()); GameRegistry.registerItem(ingot_meteorite, ingot_meteorite.getUnlocalizedName()); GameRegistry.registerItem(ingot_meteorite_forged, ingot_meteorite_forged.getUnlocalizedName()); GameRegistry.registerItem(blade_meteorite, blade_meteorite.getUnlocalizedName()); @@ -4785,6 +4797,7 @@ public class ModItems { GameRegistry.registerItem(plate_armor_ajr, plate_armor_ajr.getUnlocalizedName()); GameRegistry.registerItem(plate_armor_hev, plate_armor_hev.getUnlocalizedName()); GameRegistry.registerItem(plate_armor_lunar, plate_armor_lunar.getUnlocalizedName()); + GameRegistry.registerItem(plate_armor_fau, plate_armor_fau.getUnlocalizedName()); //Boards GameRegistry.registerItem(board_copper, board_copper.getUnlocalizedName()); @@ -5157,6 +5170,8 @@ public class ModItems { //Folders GameRegistry.registerItem(template_folder, template_folder.getUnlocalizedName()); GameRegistry.registerItem(journal_pip, journal_pip.getUnlocalizedName()); + GameRegistry.registerItem(journal_bj, journal_bj.getUnlocalizedName()); + GameRegistry.registerItem(journal_silver, journal_silver.getUnlocalizedName()); GameRegistry.registerItem(bobmazon_materials, bobmazon_materials.getUnlocalizedName()); GameRegistry.registerItem(bobmazon_machines, bobmazon_machines.getUnlocalizedName()); GameRegistry.registerItem(bobmazon_weapons, bobmazon_weapons.getUnlocalizedName()); @@ -6290,7 +6305,9 @@ public class ModItems { GameRegistry.registerItem(heart_piece, heart_piece.getUnlocalizedName()); GameRegistry.registerItem(heart_container, heart_container.getUnlocalizedName()); GameRegistry.registerItem(heart_booster, heart_booster.getUnlocalizedName()); + GameRegistry.registerItem(heart_fab, heart_fab.getUnlocalizedName()); GameRegistry.registerItem(wd40, wd40.getUnlocalizedName()); + GameRegistry.registerItem(scrumpy, scrumpy.getUnlocalizedName()); //The Gadget GameRegistry.registerItem(gadget_explosive, gadget_explosive.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/armor/ItemModInsert.java b/src/main/java/com/hbm/items/armor/ItemModInsert.java index 9b4329594..8ec872f84 100644 --- a/src/main/java/com/hbm/items/armor/ItemModInsert.java +++ b/src/main/java/com/hbm/items/armor/ItemModInsert.java @@ -99,7 +99,7 @@ public class ItemModInsert extends ItemArmorMod { event.entity.worldObj.newExplosion(event.entity, event.entity.posX, event.entity.posY - event.entity.yOffset + event.entity.height * 0.5, event.entity.posZ, 0.05F, false, false); } - if(insert.getItemDamage() > insert.getMaxDamage()) { + if(insert.getItemDamage() >= insert.getMaxDamage()) { ArmorModHandler.removeMod(armor, ArmorModHandler.kevlar); } else { ArmorModHandler.applyMod(armor, insert); diff --git a/src/main/java/com/hbm/items/armor/ItemModRevive.java b/src/main/java/com/hbm/items/armor/ItemModRevive.java new file mode 100644 index 000000000..94e9c4146 --- /dev/null +++ b/src/main/java/com/hbm/items/armor/ItemModRevive.java @@ -0,0 +1,34 @@ +package com.hbm.items.armor; + +import java.util.List; + +import com.hbm.handler.ArmorModHandler; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class ItemModRevive extends ItemArmorMod { + + public ItemModRevive(int durability) { + super(ArmorModHandler.extra, false, false, true, false); + this.setMaxDamage(durability); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + + list.add(EnumChatFormatting.GOLD + "But how did you survive?"); + list.add(EnumChatFormatting.RED + "I was drunk."); + + list.add(""); + super.addInformation(stack, player, list, bool); + } + + @Override + public void addDesc(List list, ItemStack stack, ItemStack armor) { + + list.add(EnumChatFormatting.GOLD + " " + stack.getDisplayName() + " (" + (stack.getMaxDamage() - stack.getItemDamage()) + " revives left)"); + } + +} diff --git a/src/main/java/com/hbm/items/armor/ItemModTesla.java b/src/main/java/com/hbm/items/armor/ItemModTesla.java index 114a1f69e..6591b4d88 100644 --- a/src/main/java/com/hbm/items/armor/ItemModTesla.java +++ b/src/main/java/com/hbm/items/armor/ItemModTesla.java @@ -20,6 +20,7 @@ import net.minecraft.client.renderer.entity.RenderPlayer; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraftforge.client.event.RenderPlayerEvent; @@ -32,6 +33,19 @@ public class ItemModTesla extends ItemArmorMod { public ItemModTesla() { super(ArmorModHandler.plate_only, false, true, false, false); } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add(EnumChatFormatting.YELLOW + "Zaps nearby entities (requires full electric set)"); + list.add(""); + super.addInformation(itemstack, player, list, bool); + } + + @SideOnly(Side.CLIENT) + public void addDesc(List list, ItemStack stack, ItemStack armor) { + list.add(EnumChatFormatting.YELLOW + stack.getDisplayName() + " (zaps nearby entities)"); + } @Override public void modUpdate(EntityLivingBase entity, ItemStack armor) { diff --git a/src/main/java/com/hbm/items/machine/ItemAssemblyTemplate.java b/src/main/java/com/hbm/items/machine/ItemAssemblyTemplate.java index a0755cbf8..246519e7a 100644 --- a/src/main/java/com/hbm/items/machine/ItemAssemblyTemplate.java +++ b/src/main/java/com/hbm/items/machine/ItemAssemblyTemplate.java @@ -1,11 +1,13 @@ package com.hbm.items.machine; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import com.hbm.inventory.AssemblerRecipes; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.RecipesCommon.OreDictStack; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import com.hbm.util.I18nUtil; @@ -37,7 +39,7 @@ public class ItemAssemblyTemplate extends Item { ComparableStack stack = AssemblerRecipes.recipeList.get(meta); - if(AssemblerRecipes.hidden.contains(stack)) + if(AssemblerRecipes.hidden.get(stack) != null) return this.hiddenIcon; return this.itemIcon; @@ -99,9 +101,6 @@ public class ItemAssemblyTemplate extends Item { if(!(stack.getItem() instanceof ItemAssemblyTemplate)) return; - list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder")); - list.add(""); - int i = stack.getItemDamage(); if(i < 0 || i >= AssemblerRecipes.recipeList.size()) { @@ -111,6 +110,22 @@ public class ItemAssemblyTemplate extends Item { ComparableStack out = AssemblerRecipes.recipeList.get(i); + HashSet folders = AssemblerRecipes.hidden.get(out); + + if(folders == null) + folders = new HashSet() {{ add(ModItems.template_folder); }}; + + String[] names = new String[folders.size()]; + + int a = 0; + for(Item folder : folders) { + names[a] = I18nUtil.resolveKey(folder.getUnlocalizedName() + ".name"); + a++; + } + + list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", String.join(" / ", names))); + list.add(""); + if(out == null) { list.add("I AM ERROR"); return; diff --git a/src/main/java/com/hbm/items/special/ItemHotDusted.java b/src/main/java/com/hbm/items/special/ItemHotDusted.java index 7e4dd3b59..b3df0f71e 100644 --- a/src/main/java/com/hbm/items/special/ItemHotDusted.java +++ b/src/main/java/com/hbm/items/special/ItemHotDusted.java @@ -9,11 +9,12 @@ public class ItemHotDusted extends ItemHot { public ItemHotDusted(int heat) { super(heat); + this.setHasSubtypes(true); } @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { - list.add("Forged " + stack.getItemDamage() + " times"); + list.add("Forged " + stack.getItemDamage() + " time(s)"); } public static int getMaxHeat(ItemStack stack) { diff --git a/src/main/java/com/hbm/items/tool/ItemWandD.java b/src/main/java/com/hbm/items/tool/ItemWandD.java index dc36ce223..d4ac178bc 100644 --- a/src/main/java/com/hbm/items/tool/ItemWandD.java +++ b/src/main/java/com/hbm/items/tool/ItemWandD.java @@ -47,7 +47,7 @@ public class ItemWandD extends Item { //CellularDungeonFactory.jungle.generate(world, x, y + 4, z, world.rand); //CellularDungeonFactory.jungle.generate(world, x, y + 8, z, world.rand); - new AncientTomb().build(world, x, y + 10, z); + new AncientTomb().build(world, world.rand, x, y + 10, z); //new ArcticVault().trySpawn(world, x, y, z); diff --git a/src/main/java/com/hbm/items/weapon/ItemGunOSIPR.java b/src/main/java/com/hbm/items/weapon/ItemGunOSIPR.java index 827fadd31..e24eead2d 100644 --- a/src/main/java/com/hbm/items/weapon/ItemGunOSIPR.java +++ b/src/main/java/com/hbm/items/weapon/ItemGunOSIPR.java @@ -2,6 +2,8 @@ package com.hbm.items.weapon; import com.hbm.entity.projectile.EntityCombineBall; import com.hbm.handler.GunConfiguration; +import com.hbm.items.ModItems; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -36,6 +38,7 @@ public class ItemGunOSIPR extends ItemGunBase { world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, 1F); setCharge(stack, 0); setDelay(stack, altConfig.rateOfFire); + player.inventory.consumeInventoryItem(ModItems.gun_osipr_ammo2); } else if(i > 0) setCharge(stack, i + 1); diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index 8cebad56c..c457496e8 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -105,7 +105,9 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 1, 2), new WeightedRandomChestContent(ModItems.bomb_caller, 1, 1, 1, 1), new WeightedRandomChestContent(ModItems.bomb_caller, 2, 1, 1, 1), - new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 4) }; + new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.journal_pip, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.journal_bj, 0, 1, 1, 1) }; private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] { new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index 2e6bda053..2c9a9c431 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -9,6 +9,7 @@ import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; import com.hbm.tileentity.machine.TileEntitySafe; import com.hbm.tileentity.machine.TileEntitySoyuzCapsule; +import com.hbm.world.dungeon.AncientTomb; import com.hbm.world.dungeon.Antenna; import com.hbm.world.dungeon.ArcticVault; import com.hbm.world.dungeon.Barrel; @@ -565,6 +566,14 @@ public class HbmWorldGen implements IWorldGenerator { int y = 16 + rand.nextInt(32); new ArcticVault().trySpawn(world, x, y, z); } + + if (WorldConfig.pyramidStructure > 0 && biome == BiomeGenBase.desert && rand.nextInt(WorldConfig.pyramidStructure) == 0) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new AncientTomb().build(world, rand, x, y, z); + } } if (rand.nextInt(25) == 0) { diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index ae208adc3..a14e7633a 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ package com.hbm.lib; public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.27 BETA (3766)"; + public static final String VERSION = "1.0.27 BETA (3773)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 95943e41c..eccb0d8c0 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -218,6 +218,7 @@ public class ClientProxy extends ServerProxy { MinecraftForgeClient.registerItemRenderer(ModItems.chemistry_template, new ItemRenderTemplate()); //hot stuff MinecraftForgeClient.registerItemRenderer(ModItems.ingot_steel_dusted, new ItemRendererHot()); + MinecraftForgeClient.registerItemRenderer(ModItems.ingot_chainsteel, new ItemRendererHot()); MinecraftForgeClient.registerItemRenderer(ModItems.ingot_meteorite, new ItemRendererHot()); MinecraftForgeClient.registerItemRenderer(ModItems.ingot_meteorite_forged, new ItemRendererHot()); MinecraftForgeClient.registerItemRenderer(ModItems.blade_meteorite, new ItemRendererHot()); diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 143cf85e0..cd55c7350 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -682,6 +682,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_armor_ajr, 1), new Object[] { "NPN", "PIP", "NPN", 'N', "plateIron", 'P', ModItems.plate_saturnite, 'I', ModItems.plate_armor_titanium })); GameRegistry.addRecipe(new ItemStack(ModItems.plate_armor_hev, 1), new Object[] { "NPN", "PIP", "NPN", 'N', ModItems.wire_tungsten, 'P', ModItems.plate_advanced_alloy, 'I', ModItems.plate_armor_titanium }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_armor_lunar, 1), new Object[] { "NPN", "PIP", "NPN", 'N', ModItems.wire_magnetized_tungsten, 'P', "plateDenseLead", 'I', ModItems.ingot_starmetal })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_armor_fau, 1), new Object[] { "MDM", "DYD", "MDM", 'M', ModItems.ingot_meteorite_forged, 'D', "ingotDesh", 'Y', ModItems.billet_yharonite })); GameRegistry.addRecipe(new ItemStack(ModItems.mech_key, 1), new Object[] { "MCM", "MKM", "MMM", 'M', ModItems.ingot_meteorite_forged, 'C', ModItems.coin_maskman, 'K', ModItems.key }); @@ -899,12 +900,13 @@ public class CraftingManager { GameRegistry.addSmelting(ModItems.circuit_red_copper, new ItemStack(ModItems.circuit_copper, 1), 1.0F); GameRegistry.addSmelting(ModItems.circuit_copper, new ItemStack(ModItems.circuit_aluminium, 1), 1.0F); + GameRegistry.addSmelting(ModItems.ingot_chainsteel, ItemHot.heatUp(new ItemStack(ModItems.ingot_chainsteel)), 1.0F); GameRegistry.addSmelting(ModItems.ingot_meteorite, ItemHot.heatUp(new ItemStack(ModItems.ingot_meteorite)), 1.0F); GameRegistry.addSmelting(ModItems.ingot_meteorite_forged, ItemHot.heatUp(new ItemStack(ModItems.ingot_meteorite_forged)), 1.0F); GameRegistry.addSmelting(ModItems.blade_meteorite, ItemHot.heatUp(new ItemStack(ModItems.blade_meteorite)), 1.0F); GameRegistry.addSmelting(ModItems.meteorite_sword, ItemHot.heatUp(new ItemStack(ModItems.meteorite_sword_seared)), 1.0F); - //for(int i = 0; i < 10; i++) - // GameRegistry.addSmelting(new ItemStack(ModItems.ingot_steel_dusted, 1, i), ItemHot.heatUp(new ItemStack(ModItems.ingot_steel_dusted, 1, i)), 1.0F); + for(int i = 0; i < 10; i++) + GameRegistry.addSmelting(new ItemStack(ModItems.ingot_steel_dusted, 1, i), ItemHot.heatUp(new ItemStack(ModItems.ingot_steel_dusted, 1, i)), 1.0F); } } diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 3878736b5..6f058019d 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -271,6 +271,8 @@ public class MainRegistry { ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); + ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.scrumpy), 1, 1, 1)); + ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.scrumpy), 1, 1, 1)); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GUIHandler()); GameRegistry.registerTileEntity(TileEntityTestBombAdvanced.class, "tilentity_testbombadvanced"); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index eb3bcb2ff..6e5abaab6 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -35,6 +35,7 @@ import com.hbm.handler.HTTPHandler; import com.hbm.items.ModItems; import com.hbm.items.armor.ArmorFSB; import com.hbm.items.armor.ItemArmorMod; +import com.hbm.items.armor.ItemModRevive; import com.hbm.items.special.ItemHot; import com.hbm.items.weapon.ItemGunBase; import com.hbm.lib.Library; @@ -157,6 +158,32 @@ public class ModEventHandler HbmLivingProps.setRadiation(event.entityLiving, 0); + for(int i = 1; i < 5; i++) { + + ItemStack stack = event.entityLiving.getEquipmentInSlot(i); + + if(stack != null && stack.getItem() instanceof ItemArmor && ArmorModHandler.hasMods(stack)) { + + ItemStack revive = ArmorModHandler.pryMods(stack)[ArmorModHandler.extra]; + + if(revive != null && revive.getItem() instanceof ItemModRevive) { + + revive.setItemDamage(revive.getItemDamage() + 1); + + if(revive.getItemDamage() >= revive.getMaxDamage()) { + ArmorModHandler.removeMod(stack, ArmorModHandler.extra); + } else { + ArmorModHandler.applyMod(stack, revive); + } + + event.entityLiving.setHealth(event.entityLiving.getMaxHealth()); + event.entityLiving.addPotionEffect(new PotionEffect(Potion.resistance.id, 60, 99)); + event.setCanceled(true); + return; + } + } + } + if(event.entity.worldObj.isRemote) return; @@ -956,7 +983,7 @@ public class ModEventHandler } if(event.left.getItem() == ModItems.ingot_steel_dusted && event.right.getItem() == ModItems.ingot_steel_dusted && - event.left.stackSize == 1 && event.right.stackSize == 1) { + event.left.stackSize == event.right.stackSize) { double h1 = ItemHot.getHeat(event.left); double h2 = ItemHot.getHeat(event.right); @@ -967,11 +994,13 @@ public class ModEventHandler int i2 = event.right.getItemDamage(); int i3 = Math.min(i1, i2) + 1; + + boolean done = i3 >= 10; - ItemStack out = new ItemStack(ModItems.ingot_steel_dusted, 1, i3); - ItemHot.heatUp(out, (h1 + h2) / 2D); + ItemStack out = new ItemStack(done ? ModItems.ingot_chainsteel : ModItems.ingot_steel_dusted, event.left.stackSize, done ? 0 : i3); + ItemHot.heatUp(out, done ? 1D : (h1 + h2) / 2D); event.output = out; - event.cost = 1; + event.cost = event.left.stackSize; } } } diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java b/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java index 5f0166ccc..9e60ea99c 100644 --- a/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java +++ b/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java @@ -185,18 +185,20 @@ public class RenderBullet extends Render { private void renderNuke(int type) { - GL11.glScaled(0.5, 0.5, 0.5); - GL11.glRotated(90, 0, 0, 1); - GL11.glRotated(90, 0, 1, 0); - switch(type) { case 0: + GL11.glScaled(0.5, 0.5, 0.5); + GL11.glRotated(90, 0, 0, 1); + GL11.glRotated(90, 0, 1, 0); GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.mini_nuke_tex); ResourceManager.projectiles.renderPart("MiniNuke"); GL11.glShadeModel(GL11.GL_FLAT); break; case 1: + GL11.glScaled(0.5, 0.5, 0.5); + GL11.glRotated(90, 0, 0, 1); + GL11.glRotated(90, 0, 1, 0); GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.mini_mirv_tex); ResourceManager.projectiles.renderPart("MiniMIRV"); @@ -268,6 +270,10 @@ public class RenderBullet extends Render { private void renderFlechette() { + GL11.glScaled(0.5, 0.5, 0.5); + GL11.glRotated(90, 0, 0, 1); + GL11.glRotated(90, 0, 1, 0); + GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.flechette_tex); ResourceManager.projectiles.renderPart("Flechette"); diff --git a/src/main/java/com/hbm/world/dungeon/AncientTomb.java b/src/main/java/com/hbm/world/dungeon/AncientTomb.java index 2c4b273b9..2d90117e8 100644 --- a/src/main/java/com/hbm/world/dungeon/AncientTomb.java +++ b/src/main/java/com/hbm/world/dungeon/AncientTomb.java @@ -2,23 +2,154 @@ package com.hbm.world.dungeon; import java.util.Arrays; import java.util.List; +import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.inventory.RecipesCommon.MetaBlock; import com.hbm.world.generator.DungeonToolbox; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class AncientTomb { - public void build(World world, int x, int y, int z) { + public void build(World world, Random rand, int x, int y, int z) { List concrete = Arrays.asList(new MetaBlock[] { new MetaBlock(ModBlocks.brick_concrete), new MetaBlock(ModBlocks.brick_concrete_broken), new MetaBlock(ModBlocks.brick_concrete_cracked)}); + y = 20; + + /// PYRAMID Y LOCATION /// + int yOff = Math.max(world.getHeightValue(x, z), 35) - 5; + + int pySize = 15; + + /// PRINT PYRAMID /// + for(int iy = pySize; iy > 0; iy--) { + + int range = (pySize - iy); + + for(int ix = -range; ix <= range; ix++) { + for(int iz = -range; iz <= range; iz++) { + + if((ix <= -range + 1 || ix >= range - 1) && (iz <= -range + 1 || iz >= range - 1)) { + world.setBlock(x + ix, yOff + iy, z + iz, ModBlocks.reinforced_stone); + continue; + } + + if(iy == 1) { + world.setBlock(x + ix, yOff + iy, z + iz, ModBlocks.concrete_smooth); + continue; + } + + if((ix <= -range + 1 || ix >= range - 1) || (iz <= -range + 1 || iz >= range - 1)) { + world.setBlock(x + ix, yOff + iy, z + iz, ModBlocks.concrete_smooth); + continue; + } + + world.setBlockToAir(x + ix, yOff + iy, z + iz); + } + } + } + + DungeonToolbox.generateBox(world, x - 2, yOff + 2, z - 2, 5, 4, 5, concrete); + world.setBlock(x + 2, yOff + 3, z, ModBlocks.brick_concrete_marked); + world.setBlock(x - 2, yOff + 3, z, ModBlocks.brick_concrete_marked); + world.setBlock(x, yOff + 3, z + 2, ModBlocks.brick_concrete_marked); + world.setBlock(x, yOff + 3, z - 2, ModBlocks.brick_concrete_marked); + + DungeonToolbox.generateBox(world, x + 5, yOff + 2, z + 5, 1, 7, 1, ModBlocks.concrete_pillar); + DungeonToolbox.generateBox(world, x + 5, yOff + 2, z - 5, 1, 7, 1, ModBlocks.concrete_pillar); + DungeonToolbox.generateBox(world, x - 5, yOff + 2, z - 5, 1, 7, 1, ModBlocks.concrete_pillar); + DungeonToolbox.generateBox(world, x - 5, yOff + 2, z + 5, 1, 7, 1, ModBlocks.concrete_pillar); + + /// PRINT SPIKES /// + int spikeCount = 36 + rand.nextInt(15); + + Vec3 vec = Vec3.createVectorHelper(20, 0, 0); + float rot = (float)Math.toRadians(360F / spikeCount); + + for(int i = 0; i < spikeCount; i++) { + + vec.rotateAroundY(rot); + + double variance = 1D + rand.nextDouble() * 0.4D; + + int ix = (int) (x + vec.xCoord * variance); + int iz = (int) (z + vec.zCoord * variance); + int iy = world.getHeightValue(ix, iz) - 3; + + for(int j = iy; j < iy + 7; j++) { + world.setBlock(ix, j, iz, ModBlocks.deco_steel); + } + } + + /// GENERATE TUNNEL /// + Vec3 sVec = Vec3.createVectorHelper(10, 0, 0); + float sRot = (float) Math.toRadians(360F / 32F); + + for(int i = y - 1; i < yOff + 2; i++) { + + int ix = (int) Math.floor(sVec.xCoord); + int iz = (int) Math.floor(sVec.zCoord); + + int h = i < yOff ? 3 : 2; + + if(i > 40) + DungeonToolbox.generateBox(world, x + ix - 1, i, z + iz - 1, 3, h, 3, Blocks.air); + else + DungeonToolbox.generateBox(world, x + ix - 1, i, z + iz - 1, 3, h, 3, ModBlocks.gas_radon_tomb); + + for(int dx = x + ix - 2; dx < x + ix + 3; dx++) { + for(int dy = i - 1; dy < i + 4; dy++) { + for(int dz = z + iz - 2; dz < z + iz + 3; dz++) { + + //if(dy >= yOff + 2) + // continue; + + Block b = world.getBlock(dx, dy, dz); + + if(b != Blocks.air && b != ModBlocks.gas_radon_tomb && b != ModBlocks.concrete && b != ModBlocks.concrete_smooth && b != ModBlocks.brick_concrete && b != ModBlocks.brick_concrete_cracked && b != ModBlocks.brick_concrete_broken) { + + MetaBlock meta = DungeonToolbox.getRandom(concrete, rand); + world.setBlock(dx, dy, dz, meta.block, meta.meta, 3); + } + } + } + } + + sVec.rotateAroundY(sRot); + } + + /// PRINT ACCESS /// + DungeonToolbox.generateBox(world, x + 4, y - 2, z - 1, 5, 1, 3, concrete); + DungeonToolbox.generateBox(world, x + 4, y - 1, z - 1, 5, 3, 3, ModBlocks.gas_radon_tomb); + DungeonToolbox.generateBox(world, x + 4, y + 2, z - 1, 5, 1, 3, concrete); + + for(int dx = x + 4; dx < x + 8; dx++) { + for(int dy = y - 1; dy < y + 4; dy++) { + for(int dz = z - 2; dz < z + 3; dz++) { + + Block b = world.getBlock(dx, dy, dz); + + if(b != Blocks.air && b != ModBlocks.gas_radon_tomb && b != ModBlocks.concrete && + b != ModBlocks.concrete_smooth && b != ModBlocks.brick_concrete && + b != ModBlocks.brick_concrete_cracked && b != ModBlocks.brick_concrete_broken) { + + MetaBlock meta = DungeonToolbox.getRandom(concrete, rand); + world.setBlock(dx, dy, dz, meta.block, meta.meta, 3); + } + } + } + } + + /// PRINT TOMB CHAMBER /// int size = 5; int cladding = size - 1; int core = size -2; @@ -42,5 +173,7 @@ public class AncientTomb { DungeonToolbox.generateBox(world, x - cladding, y - cladding, z + cladding, dimInner, dimInner, 1, ModBlocks.brick_obsidian); DungeonToolbox.generateBox(world, x - core, y - core, z - core, dimCore, dimCore, dimCore, ModBlocks.ancient_scrap); + + world.setBlock(x + size, y, z, ModBlocks.brick_concrete_marked); } } diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 97ca10cb2..c4ab8c1bf 100755 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "hbm", "name": "Hbm's Nuclear Tech", "description": "A mod that adds weapons, nuclear themed stuff and machines", - "version":"1.0.27-3766", + "version":"1.0.27-3773", "mcversion": "1.7.10", "url": "", "updateUrl": "",