diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-02-12 01:16:39 +0100 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-02-12 01:16:39 +0100 |
commit | 273c5a96dddbd4862c7f97d55e5145ae4e3d2628 (patch) | |
tree | e4e9be164215f4fdac3d7621ff1ff6392b4a1798 /src | |
parent | e412e90f5f9e571aaebf1e05d593a1f0627c8405 (diff) | |
download | GT5-Unofficial-273c5a96dddbd4862c7f97d55e5145ae4e3d2628.tar.gz GT5-Unofficial-273c5a96dddbd4862c7f97d55e5145ae4e3d2628.tar.bz2 GT5-Unofficial-273c5a96dddbd4862c7f97d55e5145ae4e3d2628.zip |
fixes
added soft dependencies,
fixed stirling generator not consuming liquid when bucketed,
fixed empty recipe when Crops++ is installed,
fixed DEHP crash when GTNH is installed
fixed DEHP not automatically starting when reaching the ground
version increase
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
Former-commit-id: 2cca15cbc1be86cdbd9175a3094fda4fcc984d37
Diffstat (limited to 'src')
4 files changed, 20 insertions, 4 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 1d48b16f2e..f8206768bb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -51,6 +51,9 @@ import org.apache.logging.log4j.Logger; modid = MainMod.MOD_ID, name = MainMod.NAME, version = MainMod.VERSION, dependencies = "required-after:IC2; " + "required-after:gregtech; " + + "after:berriespp;" + + "after:dreamcraft;" + + "after:miscutils;" ) public final class MainMod { public static final String NAME = "BartWorks"; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java index 34dc223140..4944355722 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java @@ -68,7 +68,8 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI final TileEntity tile = worldObj.getTileEntity(x, y, z); if (tile instanceof BW_TileEntity_HeatedWaterPump) { if (player.getHeldItem() != null && (player.getHeldItem().getItem().equals(Items.bucket) || player.getHeldItem().getItem() instanceof IFluidContainerItem) && ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, false) != null) - if (player.getHeldItem().getItem().equals(Items.bucket)) { + if (player.getHeldItem().getItem().equals(Items.bucket) && ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, false).amount == 1000) { + ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, true); player.getHeldItem().stackSize--; if (player.getHeldItem().stackSize <= 0) player.inventory.setInventorySlotContents(player.inventory.currentItem, null); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java index 05c63ef0cb..0b827b27a0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java @@ -316,7 +316,7 @@ public class BioRecipeLoader extends RecipeLoader { new ItemStack[]{new ItemStack(Items.sugar, 64)}, new FluidStack[]{new FluidStack(fluidStack, 100)}, BioCulture.BIO_CULTURE_ARRAY_LIST.get(1), - new FluidStack[]{(Loader.isModLoaded("berriespp") ? FluidRegistry.getFluidStack("potion.GHP", 1) : Materials.Ethanol.getFluid(1L))}, + new FluidStack[]{(Loader.isModLoaded("berriespp") ? FluidRegistry.getFluidStack("potion.ghp", 1) : Materials.Ethanol.getFluid(1L))}, 350, BW_Util.getMachineVoltageFromTier(4) ); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java index 0a69480775..cb582e8e5d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java @@ -155,6 +155,11 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { if (mMode != 3) { this.isPickingPipes = false; + try { + Field workState = this.getClass().getField("workState"); + workState.setInt(this, 0); + } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException e) { + } return true; } return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead); @@ -162,6 +167,8 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (this.getBaseMetaTileEntity().getWorld().isRemote) + return; ++mMode; if (mMode >= 4) mMode = 0; @@ -172,6 +179,11 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { if (mMode == 3) { this.isPickingPipes = true; + try { + Field workState = this.getClass().getSuperclass().getDeclaredField("workState"); + workState.setInt(this, 2); + } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException e) { + } return true; } @@ -179,6 +191,8 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { if (this.waitForPipes()) { return false; } else { + if (mMode == 0) + mMode = 1; if (ConfigHandler.DEHPDirectSteam) { if (mMode == 1) { long steamProduced = (mTier * 600 * 2L * this.mEfficiency / 10000L); @@ -223,8 +237,6 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { } private boolean consumeFluid(Fluid fluid, long ammount) { - - if (ammount > Integer.MAX_VALUE) { int[] tmp = new int[(int) (ammount / Integer.MAX_VALUE)]; Arrays.fill(tmp, (int) (ammount / Integer.MAX_VALUE)); |