Skip to content

Commit

Permalink
Small access restriction change in order to create a fluid hatch subc…
Browse files Browse the repository at this point in the history
…lass (#2654)
  • Loading branch information
xnossisx authored Nov 2, 2024
1 parent ebc0338 commit cbb9118
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@
public class MetaTileEntityFluidHatch extends MetaTileEntityMultiblockNotifiablePart
implements IMultiblockAbilityPart<IFluidTank>, 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);
Expand Down Expand Up @@ -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()));
}

Expand Down Expand Up @@ -268,7 +268,7 @@ public ModularUI.Builder createTankUI(IFluidTank fluidTank, String title, Entity
.bindPlayerInventory(entityPlayer.inventory);
}

private Consumer<List<ITextComponent>> getFluidNameText(TankWidget tankWidget) {
protected Consumer<List<ITextComponent>> getFluidNameText(TankWidget tankWidget) {
return (list) -> {
TextComponentTranslation translation = tankWidget.getFluidTextComponent();
// If there is no fluid in the tank, but there is a locked fluid
Expand All @@ -282,7 +282,7 @@ private Consumer<List<ITextComponent>> getFluidNameText(TankWidget tankWidget) {
};
}

private Consumer<List<ITextComponent>> getFluidAmountText(TankWidget tankWidget) {
protected Consumer<List<ITextComponent>> getFluidAmountText(TankWidget tankWidget) {
return (list) -> {
String fluidAmount = "";

Expand Down Expand Up @@ -339,7 +339,7 @@ private void setLocked(boolean locked) {
fluidTank.onContentsChanged();
}

private class HatchFluidTank extends NotifiableFluidTank implements IFilteredFluidContainer, IFilter<FluidStack> {
protected class HatchFluidTank extends NotifiableFluidTank implements IFilteredFluidContainer, IFilter<FluidStack> {

public HatchFluidTank(int capacity, MetaTileEntity entityToNotify, boolean isExport) {
super(capacity, entityToNotify, isExport);
Expand Down

0 comments on commit cbb9118

Please sign in to comment.