From 5cf209e2c18e133c6e90b662bd0474bb7af38845 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 19 May 2025 21:30:25 +0200 Subject: [PATCH] guh --- changelog | 5 ++++- gradle.properties | 2 +- src/main/java/com/hbm/config/ServerConfig.java | 4 ++-- src/main/java/com/hbm/handler/HbmKeybinds.java | 2 ++ .../hbm/inventory/recipes/ParticleAcceleratorRecipes.java | 4 ++-- src/main/java/com/hbm/items/block/ItemBlockStorageCrate.java | 2 +- src/main/java/com/hbm/lib/RefStrings.java | 2 +- src/main/java/com/hbm/main/ModEventHandlerClient.java | 3 +++ src/main/java/com/hbm/wiaj/GuiWorldInAJar.java | 1 + 9 files changed, 17 insertions(+), 8 deletions(-) diff --git a/changelog b/changelog index 87762a2d6..03770a9c0 100644 --- a/changelog +++ b/changelog @@ -1,7 +1,10 @@ ## Changed * All compound plates can now also be made in the assembler +* Opening crates when held is now disabled by default ## Fixed * Fixed all dud variants having the balefire explosion effect * Fixed demolition charges being able to explode multiple times when hitting entities -* Condensers are no longer affected by post-impact effects, fixing an issue where HP condenser tanks would go into the negatives \ No newline at end of file +* Condensers are no longer affected by post-impact effects, fixing an issue where HP condenser tanks would go into the negatives +* Probably fixed particle accelerator recipe config not working +* Fixed potential dupe bug involving many held inventories \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a556e9942..66c0a2486 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=5334 +mod_build_number=5335 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/com/hbm/config/ServerConfig.java b/src/main/java/com/hbm/config/ServerConfig.java index 0ca1ccdcf..ef358cedf 100644 --- a/src/main/java/com/hbm/config/ServerConfig.java +++ b/src/main/java/com/hbm/config/ServerConfig.java @@ -17,7 +17,7 @@ public class ServerConfig extends RunningConfig { public static ConfigWrapper MINE_NUKE_DAMAGE = new ConfigWrapper(100F); public static ConfigWrapper MINE_NAVAL_DAMAGE = new ConfigWrapper(60F); public static ConfigWrapper TAINT_TRAILS = new ConfigWrapper(false); - public static ConfigWrapper CRATE_OPEN_HELD = new ConfigWrapper(true); + public static ConfigWrapper CRATE_ALLOW_OPEN_HELD = new ConfigWrapper(false); public static ConfigWrapper CRATE_KEEP_CONTENTS = new ConfigWrapper(true); public static ConfigWrapper ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2); @@ -29,7 +29,7 @@ public class ServerConfig extends RunningConfig { configMap.put("MINE_NUKE_DAMAGE", MINE_NUKE_DAMAGE); configMap.put("MINE_NAVAL_DAMAGE", MINE_NAVAL_DAMAGE); configMap.put("TAINT_TRAILS", TAINT_TRAILS); - configMap.put("CRATE_OPEN_HELD", CRATE_OPEN_HELD); + configMap.put("CRATE_ALLOW_OPEN_HELD", CRATE_ALLOW_OPEN_HELD); configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS); configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE); } diff --git a/src/main/java/com/hbm/handler/HbmKeybinds.java b/src/main/java/com/hbm/handler/HbmKeybinds.java index 890ef4474..d924a7e34 100644 --- a/src/main/java/com/hbm/handler/HbmKeybinds.java +++ b/src/main/java/com/hbm/handler/HbmKeybinds.java @@ -14,6 +14,7 @@ import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent; import cpw.mods.fml.common.gameevent.InputEvent.MouseInputEvent; +import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; public class HbmKeybinds { @@ -81,6 +82,7 @@ public class HbmKeybinds { @SubscribeEvent public void keyEvent(KeyInputEvent event) { if (calculatorKey.getIsKeyPressed()) { // handle the calculator client-side only + Minecraft.getMinecraft().thePlayer.closeScreen(); FMLCommonHandler.instance().showGuiScreen(new GUICalculator()); } diff --git a/src/main/java/com/hbm/inventory/recipes/ParticleAcceleratorRecipes.java b/src/main/java/com/hbm/inventory/recipes/ParticleAcceleratorRecipes.java index 36a7b17cc..0d0121fde 100644 --- a/src/main/java/com/hbm/inventory/recipes/ParticleAcceleratorRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ParticleAcceleratorRecipes.java @@ -168,10 +168,10 @@ public class ParticleAcceleratorRecipes extends SerializableRecipe { this.recipes.add(new ParticleAcceleratorRecipe( in[0], - in[1], + in.length > 1 ? in[1] : null, momentum, out[0], - out[1] + out.length > 1 ? out[1] : null )); } diff --git a/src/main/java/com/hbm/items/block/ItemBlockStorageCrate.java b/src/main/java/com/hbm/items/block/ItemBlockStorageCrate.java index 3608619fa..bed6685d1 100644 --- a/src/main/java/com/hbm/items/block/ItemBlockStorageCrate.java +++ b/src/main/java/com/hbm/items/block/ItemBlockStorageCrate.java @@ -30,7 +30,7 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if(!ServerConfig.CRATE_OPEN_HELD.get()) return stack; + if(!ServerConfig.CRATE_ALLOW_OPEN_HELD.get()) return stack; Block block = Block.getBlockFromItem(player.getHeldItem().getItem()); if(block == ModBlocks.mass_storage) return stack; // Genuinely can't figure out how to make this part work, so I'm just not gonna mess with it. diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index 20c2f72f6..8946c809d 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 (5334)"; + public static final String VERSION = "1.0.27 BETA (5335)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 4b14ef3e6..354043ab4 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -948,6 +948,7 @@ public class ModEventHandlerClient { if(comp != null) { CanneryBase cannery = Jars.canneries.get(comp); if(cannery != null) { + Minecraft.getMinecraft().thePlayer.closeScreen(); FMLCommonHandler.instance().showGuiScreen(new GuiWorldInAJar(cannery.createScript(), cannery.getName(), cannery.getIcon(), cannery.seeAlso())); } } @@ -959,6 +960,7 @@ public class ModEventHandlerClient { if(stack != null) { stack = stack.copy(); stack.stackSize = 1; + Minecraft.getMinecraft().thePlayer.closeScreen(); FMLCommonHandler.instance().showGuiScreen(new GUIScreenPreview(stack)); } } @@ -1002,6 +1004,7 @@ public class ModEventHandlerClient { } } + Minecraft.getMinecraft().thePlayer.closeScreen(); FMLCommonHandler.instance().showGuiScreen(new GUIScreenWikiRender(stacks.toArray(new ItemStack[0]), prefix, "wiki-block-renders-256", scale)); } } else { diff --git a/src/main/java/com/hbm/wiaj/GuiWorldInAJar.java b/src/main/java/com/hbm/wiaj/GuiWorldInAJar.java index 4236c83ee..ac8fea198 100644 --- a/src/main/java/com/hbm/wiaj/GuiWorldInAJar.java +++ b/src/main/java/com/hbm/wiaj/GuiWorldInAJar.java @@ -216,6 +216,7 @@ public class GuiWorldInAJar extends GuiScreen { if(15 <= mouseX && 39 > mouseX && 15 + 36 * (i + 1) < mouseY && 39 + 36 * (i + 1) >= mouseY) { CanneryBase cannery = seeAlso[i]; mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); + Minecraft.getMinecraft().thePlayer.closeScreen(); FMLCommonHandler.instance().showGuiScreen(new GuiWorldInAJar(cannery.createScript(), cannery.getName(), cannery.getIcon(), cannery.seeAlso())); return; }