From 79c7faf55b00c17b5b47d6354db704bb44907a1a Mon Sep 17 00:00:00 2001 From: Bob Date: Sat, 5 Jul 2025 23:43:55 +0200 Subject: [PATCH] scatman's world --- changelog | 6 +- .../com/hbm/blocks/bomb/BlockVolcano.java | 2 +- .../java/com/hbm/config/GeneralConfig.java | 2 + .../hbm/items/machine/ItemFluidSiphon.java | 113 +++++++++--------- .../com/hbm/items/tool/ItemToolAbility.java | 13 +- .../weapon/sedna/factory/LegoClient.java | 1 - .../com/hbm/main/ModEventHandlerClient.java | 8 +- .../oil/TileEntityMachineRefinery.java | 2 +- .../models/machines/assembly_machine.png | Bin 0 -> 3249 bytes 9 files changed, 78 insertions(+), 69 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png diff --git a/changelog b/changelog index 0b4c4ebc0..8226bc9a5 100644 --- a/changelog +++ b/changelog @@ -3,8 +3,12 @@ * The new chemical plant can now be used to upgrade the meteorite sword * Fluid containers are now re-registered when using `/ntmreload` which should correctly generate fluid container items for freshly added custom fluids * Recipe configs will no longer try to parse null value recipes, meaing that trailing commas in a recipe config will no longer create an error +* Refinery solid byproducts now build up substantially faster + * This means fracking solution from standard oil is now a lot more viable + * This also makes the volume of oil spent consistent with the NEI handler ## Fixed * Fixed crash caused by breaking a tool while the fortune or silk touch ability is enabled * Fixed NTM adding mob spawns to the mushroom island -# Fixed line break not working on the tip of the day \ No newline at end of file +* Fixed line break not working on the tip of the day +* Fixed an issue where AoE abilities can break bedrock \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java index 6eefdf20e..16110461e 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java @@ -151,7 +151,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("tier", this.volcanoTimer); + nbt.setInteger("timer", this.volcanoTimer); } private boolean shouldGrow() { diff --git a/src/main/java/com/hbm/config/GeneralConfig.java b/src/main/java/com/hbm/config/GeneralConfig.java index c843cde57..b52f58073 100644 --- a/src/main/java/com/hbm/config/GeneralConfig.java +++ b/src/main/java/com/hbm/config/GeneralConfig.java @@ -39,6 +39,7 @@ public class GeneralConfig { public static boolean enableSoundExtension = true; public static boolean enableMekanismChanges = true; public static boolean enableServerRecipeSync = false; + public static boolean enableLoadScreenReplacement = true; public static int normalSoundChannels = 200; public static boolean enableExpensiveMode = false; @@ -120,6 +121,7 @@ public class GeneralConfig { "Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100); preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod", "The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID}); + enableLoadScreenReplacement = config.get(CATEGORY_GENERAL, "1.43_enableLoadScreenReplacement", true, "Tries to replace the vanilla load screen with the 'tip of the day' one, may clash with other mods trying to do the same.").getBoolean(true); enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false); final String CATEGORY_528 = CommonConfig.CATEGORY_528; diff --git a/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java b/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java index 2a7fc95ce..ecf9797e6 100644 --- a/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java +++ b/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java @@ -10,8 +10,7 @@ import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Unsiphonable; import com.hbm.items.ModItems; import com.hbm.items.tool.ItemPipette; -import api.hbm.fluid.IFluidStandardReceiver; -import api.hbm.fluid.IFluidStandardTransceiver; +import api.hbm.fluidmk2.IFluidStandardReceiverMK2; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -19,78 +18,82 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class ItemFluidSiphon extends Item { - + @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) { TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z); - if(te != null && (te instanceof IFluidStandardReceiver || te instanceof IFluidStandardTransceiver)) { - FluidTank[] tanks; - if (te instanceof IFluidStandardReceiver) { - tanks = ((IFluidStandardReceiver) te).getReceivingTanks(); - } else { - tanks = ((IFluidStandardTransceiver) te).getReceivingTanks(); - } + if(te != null && te instanceof IFluidStandardReceiverMK2) { + FluidTank[] tanks = ((IFluidStandardReceiverMK2) te).getReceivingTanks(); - boolean hasDrainedTank = false; - - // We need to iterate through the inventory for _each_ siphonable tank, so we can handle fluids that can only go into certain containers - // After we successfully siphon any fluid from a tank, we stop further processing, multiple fluid types require multiple clicks - for (FluidTank tank : tanks) { - if (tank.getFill() <= 0) continue; + boolean hasDrainedTank = false; - ItemStack availablePipette = null; - FluidType tankType = tank.getTankType(); + // We need to iterate through the inventory for _each_ siphonable + // tank, so we can handle fluids that can only go into certain containers + // After we successfully siphon any fluid from a tank, we stop + // further processing, multiple fluid types require multiple clicks + for(FluidTank tank : tanks) { + if(tank.getFill() <= 0) + continue; - if (tankType.hasTrait(FT_Unsiphonable.class)) continue; + ItemStack availablePipette = null; + FluidType tankType = tank.getTankType(); - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - ItemStack inventoryStack = player.inventory.mainInventory[j]; - if (inventoryStack == null) continue; + if(tankType.hasTrait(FT_Unsiphonable.class)) + continue; - FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack); + for(int j = 0; j < player.inventory.mainInventory.length; j++) { + ItemStack inventoryStack = player.inventory.mainInventory[j]; + if(inventoryStack == null) + continue; - if (availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) { - ItemPipette pipette = (ItemPipette) inventoryStack.getItem(); - if (!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now - availablePipette = inventoryStack; - } - } + FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack); - if (container == null) continue; + if(availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) { + ItemPipette pipette = (ItemPipette) inventoryStack.getItem(); + if(!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now + availablePipette = inventoryStack; + } + } - ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType); + if(container == null) + continue; - while (tank.getFill() >= container.content && inventoryStack.stackSize > 0) { - hasDrainedTank = true; + ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType); - inventoryStack.stackSize--; - if (inventoryStack.stackSize <= 0) { - player.inventory.mainInventory[j] = null; - } + while(tank.getFill() >= container.content && inventoryStack.stackSize > 0) { + hasDrainedTank = true; - ItemStack filledContainer = full.copy(); - tank.setFill(tank.getFill() - container.content); - player.inventory.addItemStackToInventory(filledContainer); - } - } + inventoryStack.stackSize--; + if(inventoryStack.stackSize <= 0) { + player.inventory.mainInventory[j] = null; + } - // If the remainder of the tank can only fit into a pipette, fill a pipette with the remainder - // Will not auto-fill fizzlable pipettes, there is no feedback for the fizzle in this case, and that's a touch too unfair - if (availablePipette != null && tank.getFill() < 1000) { - ItemPipette pipette = (ItemPipette) availablePipette.getItem(); - - if (pipette.acceptsFluid(tankType, availablePipette)) { - hasDrainedTank = true; - tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette)); - } - } + ItemStack filledContainer = full.copy(); + tank.setFill(tank.getFill() - container.content); + player.inventory.addItemStackToInventory(filledContainer); + } + } - if (hasDrainedTank) return true; - } + // If the remainder of the tank can only fit into a pipette, + // fill a pipette with the remainder + // Will not auto-fill fizzlable pipettes, there is no feedback + // for the fizzle in this case, and that's a touch too unfair + if(availablePipette != null && tank.getFill() < 1000) { + ItemPipette pipette = (ItemPipette) availablePipette.getItem(); + + if(pipette.acceptsFluid(tankType, availablePipette)) { + hasDrainedTank = true; + tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette)); + } + } + + if(hasDrainedTank) + return true; + } } return false; } - + } diff --git a/src/main/java/com/hbm/items/tool/ItemToolAbility.java b/src/main/java/com/hbm/items/tool/ItemToolAbility.java index e055c2b6b..589938c88 100644 --- a/src/main/java/com/hbm/items/tool/ItemToolAbility.java +++ b/src/main/java/com/hbm/items/tool/ItemToolAbility.java @@ -291,14 +291,11 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro Block block = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); - - if(!( - canHarvestBlock(block, stack) || - canShearBlock(block, stack, world, x, y, z)) || - block.getPlayerRelativeBlockHardness(player, world, x, y, z) < 0 || - block == ModBlocks.stone_keyhole - ) - return; + + if(!(canHarvestBlock(block, stack) || + canShearBlock(block, stack, world, x, y, z)) || + (block.getBlockHardness(world, x, y, z) == -1.0F && block.getPlayerRelativeBlockHardness(player, world, x, y, z) == 0.0F) || + block == ModBlocks.stone_keyhole) return; Block refBlock = world.getBlock(refX, refY, refZ); float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java index b49292c78..0b835d173 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java @@ -383,7 +383,6 @@ public class LegoClient { RenderArcFurnace.fullbright(true); double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1); - double col = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted + interp) / (double) bullet.getBulletConfig().expires, 0, 1); GL11.glPushMatrix(); GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0); diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 88a7441c7..b07736bff 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -1030,14 +1030,19 @@ public class ModEventHandlerClient { public static boolean renderLodeStar = false; public static long lastStarCheck = 0L; + public static long lastLoadScreenReplacement = 0L; @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.LOWEST) public void onClientTickLast(ClientTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); - if(!(mc.loadingScreen instanceof LoadingScreenRendererNT)) { + long millis = Clock.get_ms(); + if(millis == 0) millis = System.currentTimeMillis(); + + if(GeneralConfig.enableLoadScreenReplacement && !(mc.loadingScreen instanceof LoadingScreenRendererNT) && millis > lastLoadScreenReplacement + 10_000) { mc.loadingScreen = new LoadingScreenRendererNT(mc); + lastLoadScreenReplacement = millis; } if(event.phase == Phase.START && GeneralConfig.enableSkyboxes) { @@ -1067,7 +1072,6 @@ public class ModEventHandlerClient { } EntityPlayer player = mc.thePlayer; - long millis = Clock.get_ms(); if(lastStarCheck + 200 < millis) { renderLodeStar = false; diff --git a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java index b474ce248..e7ce296c2 100644 --- a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java +++ b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java @@ -49,7 +49,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements public long power = 0; public int sulfur = 0; - public static final int maxSulfur = 100; + public static final int maxSulfur = 10; public static final long maxPower = 1000; public FluidTank[] tanks; diff --git a/src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png b/src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png new file mode 100644 index 0000000000000000000000000000000000000000..6fc1a618fbdeb03988bab626b0a89b3c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