mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 10:55:06 +00:00
minor cleanup
This commit is contained in:
1 parent
67a7185261
commit
31231db459
3 files changed
+3
-7
No files matched your search
@@ -81,9 +81,7 @@ public class GuiHandlerEnergy extends GuiHandlerBase {
|
||||
return new ContainerEnginePeat(player.inventory, TileUtil.getTile(world, x, y, z, TileEnginePeat.class));
|
||||
|
||||
case EngineElectricGUI:
|
||||
TileEngineElectric tile = TileUtil.getTile(world, x, y, z, TileEngineElectric.class);
|
||||
Proxies.net.sendToPlayer(new PacketSocketUpdate(tile), player);
|
||||
return new ContainerEngineElectric(player.inventory, tile);
|
||||
return new ContainerEngineElectric(player.inventory, TileUtil.getTile(world, x, y, z, TileEngineElectric.class));
|
||||
|
||||
case GeneratorGUI:
|
||||
return new ContainerGenerator(player.inventory, TileUtil.getTile(world, x, y, z, TileGenerator.class));
|
||||
|
||||
@@ -38,9 +38,7 @@ public class GuiHandlerFarming extends GuiHandlerBase {
|
||||
|
||||
switch (GuiId.values()[id]) {
|
||||
case MultiFarmGUI:
|
||||
TileFarm tile = TileUtil.getTile(world, x, y, z, TileFarm.class);
|
||||
Proxies.net.sendToPlayer(new PacketSocketUpdate(tile), player);
|
||||
return new ContainerFarm(player.inventory, tile);
|
||||
return new ContainerFarm(player.inventory, TileUtil.getTile(world, x, y, z, TileFarm.class));
|
||||
default:
|
||||
return null;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CircuitFarmLogic extends Circuit {
|
||||
|
||||
IFarmLogic logic;
|
||||
try {
|
||||
logic = logicClass.getConstructor(new Class[]{IFarmHousing.class}).newInstance(housing);
|
||||
logic = logicClass.getConstructor(IFarmHousing.class).newInstance(housing);
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException("Failed to instantiate logic of class " + logicClass.getName() + ": " + ex.getMessage());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user