mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
removed the compat for the fluid gauge due to crashes related to the TE.
This commit is contained in:
parent
0a0af7e363
commit
52f39064fc
@ -15,13 +15,8 @@ import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
|||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
|
|
||||||
import api.hbm.fluid.IPipeNet;
|
import api.hbm.fluid.IPipeNet;
|
||||||
import cpw.mods.fml.common.Optional;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import li.cil.oc.api.machine.Arguments;
|
|
||||||
import li.cil.oc.api.machine.Callback;
|
|
||||||
import li.cil.oc.api.machine.Context;
|
|
||||||
import li.cil.oc.api.network.SimpleComponent;
|
|
||||||
import net.minecraft.block.BlockPistonBase;
|
import net.minecraft.block.BlockPistonBase;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
@ -106,8 +101,7 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
|||||||
return IBlockMultiPass.getRenderType();
|
return IBlockMultiPass.getRenderType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements INBTPacketReceiver {
|
||||||
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements INBTPacketReceiver, SimpleComponent {
|
|
||||||
|
|
||||||
private BigInteger lastMeasurement = BigInteger.valueOf(10);
|
private BigInteger lastMeasurement = BigInteger.valueOf(10);
|
||||||
private long deltaTick = 0;
|
private long deltaTick = 0;
|
||||||
@ -151,33 +145,5 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
|||||||
this.deltaLastSecond = Math.max(nbt.getLong("deltaS"), 0);
|
this.deltaLastSecond = Math.max(nbt.getLong("deltaS"), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getComponentName() {
|
|
||||||
return "ntm_fluid_gauge";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Callback(direct = true, limit = 16)
|
|
||||||
@Optional.Method(modid = "OpenComputers")
|
|
||||||
public Object[] getTick(Context context, Arguments args) {
|
|
||||||
return new Object[] {deltaTick};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Callback(direct = true, limit = 16)
|
|
||||||
@Optional.Method(modid = "OpenComputers")
|
|
||||||
public Object[] getSecond(Context context, Arguments args) {
|
|
||||||
return new Object[] {deltaSecond};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Callback(direct = true, limit = 16)
|
|
||||||
@Optional.Method(modid = "OpenComputers")
|
|
||||||
public Object[] getType(Context context, Arguments args) {
|
|
||||||
return new Object[] {I18nUtil.resolveKey(getType().getUnlocalizedName())};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Callback(direct = true, limit = 16)
|
|
||||||
@Optional.Method(modid = "OpenComputers")
|
|
||||||
public Object[] getInfo(Context context, Arguments args) {
|
|
||||||
return new Object[] {deltaTick, deltaSecond, I18nUtil.resolveKey(getType().getUnlocalizedName()), xCoord, yCoord, zCoord};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user