mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
first commit on new shit
This commit is contained in:
parent
8fac493947
commit
42f7e7407b
@ -25,8 +25,12 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
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 net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -37,6 +41,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPWRController extends TileEntityMachineBase implements IGUIProvider, IControlReceiver, IFluidStandardTransceiver {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
@ -521,6 +526,43 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getComponentName() {
|
||||
return "ntm_pwr_control";
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {coreHeat, hullHeat};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFlux(Context context, Arguments args) {
|
||||
return new Object[] {flux};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getLevel(Context context, Arguments args) {
|
||||
return new Object[] {rodTarget};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {coreHeat, hullHeat, flux, rodTarget};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setLevel(Context context, Arguments args) {
|
||||
rodTarget = MathHelper.clamp_int(args.checkInteger(0), 0, 100);
|
||||
this.markChanged();
|
||||
return new Object[] {true};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerPWR(player.inventory, this);
|
||||
|
||||
@ -4,21 +4,15 @@ import com.hbm.inventory.container.ContainerRBMKStorage;
|
||||
import com.hbm.inventory.gui.GUIRBMKStorage;
|
||||
import com.hbm.items.machine.ItemRBMKRod;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
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.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements IRBMKLoadable, SimpleComponent {
|
||||
public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements IRBMKLoadable {
|
||||
|
||||
public TileEntityRBMKStorage() {
|
||||
super(12);
|
||||
@ -91,35 +85,6 @@ public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements
|
||||
slots[0] = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "rbmk_storage_rod";
|
||||
}
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getStored(Context context, Arguments args) {
|
||||
return new Object[] {slots[0], slots[1], slots[2], slots[3], slots[4], slots[5], slots[6], slots[7], slots[8], slots[9], slots[10], slots[11]};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, slots[0], slots[1], slots[2], slots[3], slots[4], slots[5], slots[6], slots[7], slots[8], slots[9], slots[10], slots[11], xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerRBMKStorage(player.inventory, this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user