From cbb91189e877dca84555525d0af249a883b18bbd Mon Sep 17 00:00:00 2001 From: xnossisx <36285517+xnossisx@users.noreply.github.com> Date: Sat, 2 Nov 2024 18:08:35 -0500 Subject: [PATCH] Small access restriction change in order to create a fluid hatch subclass (#2654) --- .../MetaTileEntityFluidHatch.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFluidHatch.java b/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFluidHatch.java index 8eca7ca9111..8cf7c4f2e6a 100644 --- a/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFluidHatch.java +++ b/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFluidHatch.java @@ -47,16 +47,16 @@ public class MetaTileEntityFluidHatch extends MetaTileEntityMultiblockNotifiablePart implements IMultiblockAbilityPart, IControllable { - private static final int INITIAL_INVENTORY_SIZE = 8000; + public static final int INITIAL_INVENTORY_SIZE = 8000; // only holding this for convenience - private final HatchFluidTank fluidTank; - private boolean workingEnabled; + protected final HatchFluidTank fluidTank; + protected boolean workingEnabled; // export hatch-only fields - private boolean locked; + protected boolean locked; @Nullable - private FluidStack lockedFluid; + protected FluidStack lockedFluid; public MetaTileEntityFluidHatch(ResourceLocation metaTileEntityId, int tier, boolean isExportHatch) { super(metaTileEntityId, tier, isExportHatch); @@ -176,7 +176,7 @@ public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, } } - private int getInventorySize() { + protected int getInventorySize() { return INITIAL_INVENTORY_SIZE * (1 << Math.min(9, getTier())); } @@ -268,7 +268,7 @@ public ModularUI.Builder createTankUI(IFluidTank fluidTank, String title, Entity .bindPlayerInventory(entityPlayer.inventory); } - private Consumer> getFluidNameText(TankWidget tankWidget) { + protected Consumer> getFluidNameText(TankWidget tankWidget) { return (list) -> { TextComponentTranslation translation = tankWidget.getFluidTextComponent(); // If there is no fluid in the tank, but there is a locked fluid @@ -282,7 +282,7 @@ private Consumer> getFluidNameText(TankWidget tankWidget) { }; } - private Consumer> getFluidAmountText(TankWidget tankWidget) { + protected Consumer> getFluidAmountText(TankWidget tankWidget) { return (list) -> { String fluidAmount = ""; @@ -339,7 +339,7 @@ private void setLocked(boolean locked) { fluidTank.onContentsChanged(); } - private class HatchFluidTank extends NotifiableFluidTank implements IFilteredFluidContainer, IFilter { + protected class HatchFluidTank extends NotifiableFluidTank implements IFilteredFluidContainer, IFilter { public HatchFluidTank(int capacity, MetaTileEntity entityToNotify, boolean isExport) { super(capacity, entityToNotify, isExport);