From 33d749a7b4455cb236fd49fcfbbfd2c0b73a8d0e Mon Sep 17 00:00:00 2001 From: HbmMods Date: Thu, 27 Dec 2018 12:26:04 +0100 Subject: [PATCH] once more with feeling --- com/hbm/inventory/gui/GUIReactorControl.java | 40 ++++++++++--------- com/hbm/lib/RefStrings.java | 2 +- com/hbm/packet/AuxButtonPacket.java | 2 + .../machine/TileEntityReactorControl.java | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/com/hbm/inventory/gui/GUIReactorControl.java b/com/hbm/inventory/gui/GUIReactorControl.java index 2980e448d..63cdc00aa 100644 --- a/com/hbm/inventory/gui/GUIReactorControl.java +++ b/com/hbm/inventory/gui/GUIReactorControl.java @@ -239,25 +239,27 @@ public class GUIReactorControl extends GuiInfoContainer { { super.handleMouseInput(); int i = Mouse.getEventDWheel(); - - if (i > 0) - { - i = 1; + + if(i != 0) { + if (i > 0) + { + i = 1; + } + + if (i < 0) + { + i = -1; + } + + int rods = control.rods + i; + + if(rods < 0) + rods = 0; + + if(rods > 100) + rods = 100; + + PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, rods, 0)); } - - if (i < 0) - { - i = -1; - } - - int rods = control.rods + i; - - if(rods < 0) - rods = 0; - - if(rods > 100) - rods = 100; - - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, rods, 0)); } } diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index 3abd50da8..c6ef4e265 100644 --- a/com/hbm/lib/RefStrings.java +++ b/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 (3000)"; + public static final String VERSION = "1.0.27 BETA (3000B)"; //HBM's Beta Naming Convention: //V T (X-Y-Z) //V -> next release version diff --git a/com/hbm/packet/AuxButtonPacket.java b/com/hbm/packet/AuxButtonPacket.java index 04d6b14fb..948d66927 100644 --- a/com/hbm/packet/AuxButtonPacket.java +++ b/com/hbm/packet/AuxButtonPacket.java @@ -133,6 +133,8 @@ public class AuxButtonPacket implements IMessage { if (reac instanceof TileEntityMachineReactorSmall) { TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)reac; + System.out.println(m.id + "/" + m.value); + if(m.id == 0) reactor.retracting = m.value == 0; diff --git a/com/hbm/tileentity/machine/TileEntityReactorControl.java b/com/hbm/tileentity/machine/TileEntityReactorControl.java index 69112b1e9..c184b3284 100644 --- a/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -272,7 +272,7 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent reactor.retracting = true; } - } else if(linkY >= 0 && worldObj.getTileEntity(linkX, linkY, linkZ) instanceof TileEntityMachineReactorLarge) { + } else if(linkY >= 0 && worldObj.getTileEntity(linkX, linkY, linkZ) instanceof TileEntityMachineReactorLarge && ((TileEntityMachineReactorLarge)worldObj.getTileEntity(linkX, linkY, linkZ)).checkBody()) { TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)worldObj.getTileEntity(linkX, linkY, linkZ); hullHeat = reactor.hullHeat;