mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 19:29:17 +00:00
Add "No Power" error state to multifarm
This commit is contained in:
1 parent
220ce0b6a2
commit
acb85e75ef
1 file changed
+3
-2
Executable → Regular
+3
-2
@@ -13,6 +13,7 @@ package forestry.farming.gadgets;
|
||||
import forestry.api.core.ITileStructure;
|
||||
import forestry.api.farming.IFarmHousing;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.gadgets.TileForestry;
|
||||
import forestry.core.interfaces.IPowerHandler;
|
||||
import forestry.energy.EnergyManager;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -66,10 +67,10 @@ public class TileGearbox extends TileFarm implements IPowerHandler {
|
||||
|
||||
if (energyManager.getTotalEnergyStored() == 0) {
|
||||
ITileStructure central = getCentralTE();
|
||||
if (!(central instanceof TileFarmPlain))
|
||||
if (!(central instanceof TileForestry))
|
||||
return;
|
||||
|
||||
TileFarmPlain centralHousing = (TileFarmPlain) central;
|
||||
TileForestry centralHousing = (TileForestry) central;
|
||||
centralHousing.setErrorState(EnumErrorCode.NOPOWER);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user