From ecab0fbcb31482c00ec6f8ddd4cf180bbe2a437d Mon Sep 17 00:00:00 2001 From: Boblet Date: Thu, 12 Feb 2026 13:04:32 +0100 Subject: [PATCH] massacre of blibble's field --- changelog | 18 ++++++++++++- .../hbm/blocks/machine/MachineChungus.java | 9 +++++-- .../machine/MachineIndustrialTurbine.java | 13 +++++++--- .../TileEntityMachineIndustrialTurbine.java | 24 +++++++++++++++++- .../machine/TileEntityTurbineBase.java | 5 ---- .../{canned_jizz.png => canned_slime.png} | Bin 6 files changed, 57 insertions(+), 12 deletions(-) rename src/main/resources/assets/hbm/textures/items/{canned_jizz.png => canned_slime.png} (100%) diff --git a/changelog b/changelog index 790dde47c..10990a0bc 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,20 @@ +## Added +* Target pistol + * Weapon steel tier pistol that holds 15 rounds and shoots .22 LR + * Accepts silencers + ## Changed +* Reworked the industrial turbine + * New model and texture + * Removed the GUI, it now uses the same in-world compressor toggle as the leviathan turbine + * No longer has a volatile power buffer, power isn't buffered at all anymore, similar to steam engines and MHD turbines + * Steam capacity changes based on compression level, the ratio for turbine cascades is now 1:1:1:1 + * Comes with a flywheel, energy output slowly ramps up as steam is supplied and slowly goes down as steam cuts out +* Leviathan turbines no longer have a power buffer +* Updated russian and chinese localization * The PWR can now be controlled via RoR * The RoR value reader can read core and hull heat as well as fuel depletion in percent - * The RoR controller can set the control rod level in percent as well as jetison all loaded fuel \ No newline at end of file + * The RoR controller can set the control rod level in percent as well as jetison all loaded fuel + +# Fixed +* Fixed proxy tiles that do not use electricity at all visually connecting to cables \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/machine/MachineChungus.java b/src/main/java/com/hbm/blocks/machine/MachineChungus.java index 793b5afbe..8972ca7ac 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineChungus.java +++ b/src/main/java/com/hbm/blocks/machine/MachineChungus.java @@ -21,6 +21,7 @@ import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; @@ -61,10 +62,14 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider, int iZ2 = entity.zCoord + dir.offsetZ * 2 + turn.offsetZ * 2; if((x == iX || x == iX2) && (z == iZ || z == iZ2) && y < entity.yCoord + 2) { - world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F); if(!world.isRemote) { - entity.onLeverPull(); + if(!entity.operational) { + world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F); + entity.onLeverPull(); + } else { + player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!")); + } } return true; diff --git a/src/main/java/com/hbm/blocks/machine/MachineIndustrialTurbine.java b/src/main/java/com/hbm/blocks/machine/MachineIndustrialTurbine.java index 54cdda6cf..aedf34003 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineIndustrialTurbine.java +++ b/src/main/java/com/hbm/blocks/machine/MachineIndustrialTurbine.java @@ -21,6 +21,7 @@ import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; @@ -53,8 +54,14 @@ public class MachineIndustrialTurbine extends BlockDummyable implements ITooltip ForgeDirection dir = ForgeDirection.getOrientation(entity.getBlockMetadata() - this.offset); if(x == entity.xCoord + dir.offsetX * 3 && z == entity.zCoord + dir.offsetZ * 3 && y == entity.yCoord + 1) { - world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F); - if(!world.isRemote) entity.onLeverPull(); + if(!world.isRemote) { + if(!entity.operational) { + world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F); + entity.onLeverPull(); + } else { + player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!")); + } + } return true; } } @@ -118,7 +125,7 @@ public class MachineIndustrialTurbine extends BlockDummyable implements ITooltip text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankInput.getFill()) + "/" + String.format(Locale.US, "%,d", tankInput.getMaxFill()) + "mB"); text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankOutput.getFill()) + "/" + String.format(Locale.US, "%,d", tankOutput.getMaxFill()) + "mB"); text.add("&[" + color + "&]" + EnumChatFormatting.RED + "<- " + EnumChatFormatting.WHITE + BobMathUtil.getShortNumber(chungus.powerBuffer) + "HE (" + - EnumChatFormatting.RESET + blocks[time] + (int) Math.round(chungus.spin * 100) + "%" + EnumChatFormatting.WHITE + ")"); + EnumChatFormatting.RESET + blocks[chungus.powerBuffer <= 0 ? 0 : time] + (int) Math.round(chungus.spin * 100) + "%" + EnumChatFormatting.WHITE + ")"); ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineIndustrialTurbine.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineIndustrialTurbine.java index 11d075769..cb0d6aafb 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineIndustrialTurbine.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineIndustrialTurbine.java @@ -15,12 +15,13 @@ import com.hbm.util.fauxpointtwelve.DirPos; import io.netty.buffer.ByteBuf; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase implements IConfigurableMachine { public static int inputTankSize = 512_000; - public static int outputTankSize = 10_240_000; + public static int outputTankSize = 2_048_000; public static double efficiency = 1D; public float rotor; @@ -132,12 +133,14 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); lastPowerTarget = nbt.getLong("lastPowerTarget"); + spin = nbt.getDouble("spin"); } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setLong("lastPowerTarget", lastPowerTarget); + nbt.setDouble("spin", spin); } @Override @@ -161,4 +164,23 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im new DirPos(xCoord - dir.offsetX * 4, yCoord + 1, zCoord - dir.offsetZ * 4, dir.getOpposite()) }; } + + AxisAlignedBB bb = null; + + @Override + public AxisAlignedBB getRenderBoundingBox() { + + if(bb == null) { + bb = AxisAlignedBB.getBoundingBox( + xCoord - 3, + yCoord, + zCoord - 3, + xCoord + 4, + yCoord + 3, + zCoord + 4 + ); + } + + return bb; + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityTurbineBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityTurbineBase.java index a57e2b3ec..7e4bedee8 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityTurbineBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityTurbineBase.java @@ -107,23 +107,18 @@ public abstract class TileEntityTurbineBase extends TileEntityLoadedBase impleme if(type == Fluids.STEAM) { tanks[0].setTankType(Fluids.HOTSTEAM); tanks[1].setTankType(Fluids.STEAM); - tanks[0].setFill(tanks[0].getFill() / 10); tanks[1].setFill(0); if(resize) { tanks[0].changeTankSize(tanks[0].getMaxFill() / 10); tanks[1].changeTankSize(tanks[1].getMaxFill() / 10); } } else if(type == Fluids.HOTSTEAM) { tanks[0].setTankType(Fluids.SUPERHOTSTEAM); tanks[1].setTankType(Fluids.HOTSTEAM); - tanks[0].setFill(tanks[0].getFill() / 10); tanks[1].setFill(0); if(resize) { tanks[0].changeTankSize(tanks[0].getMaxFill() / 10); tanks[1].changeTankSize(tanks[1].getMaxFill() / 10); } } else if(type == Fluids.SUPERHOTSTEAM) { tanks[0].setTankType(Fluids.ULTRAHOTSTEAM); tanks[1].setTankType(Fluids.SUPERHOTSTEAM); - tanks[0].setFill(tanks[0].getFill() / 10); tanks[1].setFill(0); if(resize) { tanks[0].changeTankSize(tanks[0].getMaxFill() / 10); tanks[1].changeTankSize(tanks[1].getMaxFill() / 10); } } else if(type == Fluids.ULTRAHOTSTEAM) { tanks[0].setTankType(Fluids.STEAM); tanks[1].setTankType(Fluids.SPENTSTEAM); - tanks[0].setFill(Math.min(tanks[0].getFill() * 1000, tanks[0].getMaxFill())); tanks[1].setFill(0); if(resize) { tanks[0].changeTankSize(tanks[0].getMaxFill() * 1000); tanks[1].changeTankSize(tanks[1].getMaxFill() * 1000); } } else { tanks[0].setTankType(Fluids.STEAM); tanks[1].setTankType(Fluids.SPENTSTEAM); - tanks[0].setFill(Math.min(tanks[0].getFill() * 1000, tanks[0].getMaxFill())); tanks[1].setFill(0); } markDirty(); diff --git a/src/main/resources/assets/hbm/textures/items/canned_jizz.png b/src/main/resources/assets/hbm/textures/items/canned_slime.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/canned_jizz.png rename to src/main/resources/assets/hbm/textures/items/canned_slime.png