From 9522ad4298aedb3e3783cc0824efa68521c5b2ce Mon Sep 17 00:00:00 2001 From: Lyfts <127234178+Lyfts@users.noreply.github.com> Date: Tue, 11 Jul 2023 15:30:23 +0200 Subject: [PATCH 1/2] Import getSteamCapacity from GT++ boilers --- .../tileentities/boilers/GT_MetaTileEntity_Boiler.java | 8 +++++--- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index a5b4fba4ab7..b89f1f40fea 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -278,9 +278,9 @@ private void updateFuelTimed(IGregTechTileEntity aBaseMetaTileEntity, long aTick } protected void ventSteamIfTankIsFull() { - if ((this.mSteam != null) && (this.mSteam.amount > getCapacity())) { + if ((this.mSteam != null) && (this.mSteam.amount > getSteamCapacity())) { sendSound(SOUND_EVENT_LET_OFF_EXCESS_STEAM); - this.mSteam.amount = getCapacity() * 3 / 4; + this.mSteam.amount = getSteamCapacity() * 3 / 4; } } @@ -391,6 +391,8 @@ public int getCapacity() { return 16000; } + protected int getSteamCapacity() { return getCapacity(); } + protected abstract int getProductionPerSecond(); protected abstract int getMaxTemperature(); @@ -440,7 +442,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .widget(createFuelSlot()) .widget(createAshSlot()) .widget( - new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity()) + new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getSteamCapacity()) .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10) .setDirection(ProgressBar.Direction.UP) .setPos(70, 25) diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 65b7df004a3..7fe3a3f4bb1 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -456,7 +456,7 @@ public int fill(FluidStack aFluid, boolean doFill) { public FluidTankInfo[] getTankInfo(ForgeDirection side) { return new FluidTankInfo[] { super.getTankInfo(side)[0], new FluidTankInfo(this.lavaTank.getFluid(), this.lavaTank.getCapacity()), - new FluidTankInfo(getDrainableStack(), getCapacity()) }; + new FluidTankInfo(getDrainableStack(), getSteamCapacity()) }; } @Override @@ -479,7 +479,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setPos(115, 61)) .widget(createAshSlot()) .widget( - new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity()) + new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getSteamCapacity()) .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10) .setDirection(ProgressBar.Direction.UP) .setPos(70, 25) From 12f970611eaf663363ff0cedd41a8cc67d71a959 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuster Date: Tue, 11 Jul 2023 18:28:20 +0200 Subject: [PATCH 2/2] spotless apply --- .../common/tileentities/boilers/GT_MetaTileEntity_Boiler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index b89f1f40fea..5142a06766a 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -391,7 +391,9 @@ public int getCapacity() { return 16000; } - protected int getSteamCapacity() { return getCapacity(); } + protected int getSteamCapacity() { + return getCapacity(); + } protected abstract int getProductionPerSecond();