mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Merge branch '1.10' into 1.11
* 1.10: Better OpenComputers compat.
This commit is contained in:
commit
eb5352bafc
2 files changed
+30
-2
No files matched your search
@@ -23,6 +23,7 @@ import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.ITierUpgradeable;
|
||||
import mekanism.common.capabilities.Capabilities;
|
||||
import mekanism.common.integration.IComputerIntegration;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.security.ISecurityTile;
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
@@ -42,7 +43,7 @@ import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
public class TileEntityGasTank extends TileEntityContainerBlock implements IGasHandler, ITubeConnection, IRedstoneControl, ISideConfiguration, ISecurityTile, ITierUpgradeable
|
||||
public class TileEntityGasTank extends TileEntityContainerBlock implements IGasHandler, ITubeConnection, IRedstoneControl, ISideConfiguration, ISecurityTile, ITierUpgradeable, IComputerIntegration
|
||||
{
|
||||
public enum GasMode
|
||||
{
|
||||
@@ -68,6 +69,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
public TileComponentEjector ejectorComponent;
|
||||
public TileComponentConfig configComponent;
|
||||
public TileComponentSecurity securityComponent;
|
||||
private static final String[] methods = new String[] {"getMaxGas", "getStoredGas", "getGas"};
|
||||
|
||||
public TileEntityGasTank()
|
||||
{
|
||||
@@ -422,4 +424,26 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
{
|
||||
return securityComponent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getMethods()
|
||||
{
|
||||
return methods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] invoke(int method, Object[] arguments) throws Exception
|
||||
{
|
||||
switch(method)
|
||||
{
|
||||
case 0:
|
||||
return new Object[] {gasTank.getMaxGas()};
|
||||
case 1:
|
||||
return new Object[] {gasTank.getStored()};
|
||||
case 2:
|
||||
return new Object[] {gasTank.getGas()};
|
||||
default:
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -138,7 +138,7 @@ public class TileEntityReactorLogicAdapter extends TileEntityReactorBlock implem
|
||||
}
|
||||
|
||||
private static final String[] methods = new String[] {"isIgnited", "canIgnite", "getPlasmaHeat", "getMaxPlasmaHeat", "getCaseHeat", "getMaxCaseHeat", "getInjectionRate", "setInjectionRate", "hasFuel", "getProducing", "getIgnitionTemp",
|
||||
"getEnergy", "getMaxEnergy", "getWater", "getSteam", "getFuel"};
|
||||
"getEnergy", "getMaxEnergy", "getWater", "getSteam", "getFuel", "getDeuterium", "getTritium"};
|
||||
|
||||
@Override
|
||||
public String[] getMethods()
|
||||
@@ -196,6 +196,10 @@ public class TileEntityReactorLogicAdapter extends TileEntityReactorBlock implem
|
||||
return new Object[] {getReactor().getSteamTank().getFluidAmount()};
|
||||
case 15:
|
||||
return new Object[] {getReactor().getFuelTank().getStored()};
|
||||
case 16:
|
||||
return new Object[] {getReactor().getDeuteriumTank().getStored()};
|
||||
case 17:
|
||||
return new Object[] {getReactor().getTritiumTank().getStored()};
|
||||
default:
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user