mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Add checking to make sure client and server can't open different GUIs
This commit is contained in:
1 parent
408a66bb40
commit
3c7856f264
39 files changed
+434
-236
No files matched your search
@@ -75,8 +75,8 @@ import forestry.farming.FarmHelper;
|
||||
import forestry.farming.FarmTarget;
|
||||
import forestry.farming.gui.IFarmLedgerDelegate;
|
||||
import forestry.farming.logic.FarmLogicArboreal;
|
||||
import forestry.farming.tiles.TileFarmGearbox;
|
||||
import forestry.farming.tiles.TileFarmPlain;
|
||||
import forestry.farming.tiles.TileGearbox;
|
||||
|
||||
public class FarmController extends RectangularMultiblockControllerBase implements IFarmControllerInternal, ILiquidTankTile {
|
||||
|
||||
@@ -212,7 +212,7 @@ public class FarmController extends RectangularMultiblockControllerBase implemen
|
||||
|
||||
boolean hasGearbox = false;
|
||||
for (IMultiblockComponent part : connectedParts) {
|
||||
if (part instanceof TileGearbox) {
|
||||
if (part instanceof TileFarmGearbox) {
|
||||
hasGearbox = true;
|
||||
break;
|
||||
}
|
||||
@@ -264,8 +264,8 @@ public class FarmController extends RectangularMultiblockControllerBase implemen
|
||||
boolean hasPower = false;
|
||||
for (Map.Entry<IFarmComponent.Active, Integer> entry : farmActiveComponents.entrySet()) {
|
||||
IFarmComponent.Active farmComponent = entry.getKey();
|
||||
if (farmComponent instanceof TileGearbox) {
|
||||
hasPower |= ((TileGearbox) farmComponent).getEnergyManager().getTotalEnergyStored() > 0;
|
||||
if (farmComponent instanceof TileFarmGearbox) {
|
||||
hasPower |= ((TileFarmGearbox) farmComponent).getEnergyManager().getTotalEnergyStored() > 0;
|
||||
}
|
||||
|
||||
int tickOffset = entry.getValue();
|
||||
|
||||
Reference in new issue
Block a user