mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
geiger counter OC compat
This commit is contained in:
parent
3ab84d4f8a
commit
506a70a413
@ -4,9 +4,15 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
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.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
public class TileEntityGeiger extends TileEntity {
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
|
public class TileEntityGeiger extends TileEntity implements SimpleComponent {
|
||||||
|
|
||||||
int timer = 0;
|
int timer = 0;
|
||||||
int ticker = 0;
|
int ticker = 0;
|
||||||
@ -57,5 +63,15 @@ public class TileEntityGeiger extends TileEntity {
|
|||||||
int rads = (int)Math.ceil(ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord));
|
int rads = (int)Math.ceil(ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord));
|
||||||
return rads;
|
return rads;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String getComponentName() {
|
||||||
|
return "ntm_geiger";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getRads(Context context, Arguments args) {
|
||||||
|
return new Object[] {check()};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user