Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Stocking input busses don't update texture on TGS (#863)
Browse files Browse the repository at this point in the history
* fix

* move warning
  • Loading branch information
HoleFish authored Mar 31, 2024
1 parent 7fb1553 commit b73971d
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemShears;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.fluids.FluidStack;

import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
Expand Down Expand Up @@ -111,6 +112,9 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
.addInfo("Output multiplier is equal to: 2*tier^2 - 2*tier + 5")
.addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
.addController("Front center").addCasingInfoMin(mCasingName, 8, false).addInputBus("Any casing", 1)
.addStructureInfo(
EnumChatFormatting.YELLOW
+ "Stocking Input Busses and Crafting Input Busses/Buffers are not allowed!")
.addOutputBus("Any casing", 1).addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1)
.addMufflerHatch("Any casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder.get());
return tt;
Expand Down Expand Up @@ -138,16 +142,14 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a
}

@Override
public boolean checkHatch() {
public boolean addInputBusToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
// Tools from a stocking inout bus can not be damaged, this would cause an infinite durability exploit.
// Therefore disallow ME input bus.
if (!super.checkHatch()) return false;
for (GT_MetaTileEntity_Hatch_InputBus inputBus : mInputBusses) {
if (inputBus instanceof GT_MetaTileEntity_Hatch_InputBus_ME) {
return false;
}
}
return true;
if (aTileEntity == null) return false;
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus_ME) return false;
return super.addInputBusToMachineList(aTileEntity, aBaseCasingIndex);
}

@Override
Expand Down

0 comments on commit b73971d

Please sign in to comment.