mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #990 from BallOfEnergy1/master
Added OC compatibility
This commit is contained in:
commit
1b66d13611
@ -1,18 +1,5 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
@ -21,7 +8,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
@ -33,7 +19,6 @@ import com.hbm.items.machine.ItemDrillbit.EnumDrillType;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.items.weapon.ItemAmmoHIMARS;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -42,6 +27,15 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
public class AssemblerRecipes {
|
||||
|
||||
public static File config;
|
||||
|
||||
@ -5445,6 +5445,7 @@ public class ModItems {
|
||||
nothing = new Item().setUnlocalizedName("nothing").setTextureName(RefStrings.MODID + ":nothing");
|
||||
void_anim = new Item().setUnlocalizedName("void_anim").setTextureName(RefStrings.MODID + ":void_anim");
|
||||
|
||||
|
||||
bob_metalworks = new Item().setUnlocalizedName("bob_metalworks").setTextureName(RefStrings.MODID + ":bob_metalworks");
|
||||
bob_assembly = new Item().setUnlocalizedName("bob_assembly").setTextureName(RefStrings.MODID + ":bob_assembly");
|
||||
bob_chemistry = new Item().setUnlocalizedName("bob_chemistry").setTextureName(RefStrings.MODID + ":bob_chemistry");
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
@ -10,10 +8,14 @@ import com.hbm.items.machine.ItemRBMKRod;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
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.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -23,11 +25,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
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 java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityCraneConsole extends TileEntity implements INBTPacketReceiver, SimpleComponent {
|
||||
@ -341,7 +339,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return "rbmk_crane";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] move(Context context, Arguments args) {
|
||||
if(setUpCrane == true) {
|
||||
@ -371,7 +369,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return new Object[] {"Crane not found"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] load(Context context, Arguments args) {
|
||||
if (setUpCrane == true) {
|
||||
@ -381,7 +379,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return new Object[] {"Crane not found"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getDepletion(Context context, Arguments args) {
|
||||
if(loadedItem != null && loadedItem.getItem() instanceof ItemRBMKRod) {
|
||||
@ -390,7 +388,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getXenonPoison(Context context, Arguments args) {
|
||||
if(loadedItem != null && loadedItem.getItem() instanceof ItemRBMKRod) {
|
||||
|
||||
@ -2,8 +2,14 @@ package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
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;
|
||||
|
||||
public class TileEntityRBMKAbsorber extends TileEntityRBMKBase {
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKAbsorber extends TileEntityRBMKBase implements SimpleComponent {
|
||||
|
||||
@Override
|
||||
public void onMelt(int reduce) {
|
||||
@ -17,6 +23,24 @@ public class TileEntityRBMKAbsorber extends TileEntityRBMKBase {
|
||||
super.onMelt(reduce);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "rbmk_absorber_rod";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ColumnType getConsoleType() {
|
||||
return ColumnType.ABSORBER;
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import api.hbm.fluid.IFluidConductor;
|
||||
import api.hbm.fluid.IFluidConnector;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||
import com.hbm.entity.effect.EntitySpear;
|
||||
@ -25,10 +19,6 @@ import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.Compat;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IFluidConductor;
|
||||
import api.hbm.fluid.IFluidConnector;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -46,6 +36,9 @@ import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Base class for all RBMK components, active or passive. Handles heat and the explosion sequence
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluid.IFluidUser;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
@ -16,10 +16,6 @@ import com.hbm.inventory.gui.GUIRBMKBoiler;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluid.IFluidUser;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -34,6 +30,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements IFluidAcceptor, IFluidSource, IControlReceiver, IFluidStandardTransceiver, SimpleComponent {
|
||||
|
||||
@ -333,35 +332,41 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
return "rbmk_boiler";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteam(Context context, Arguments args) {
|
||||
return new Object[] {steam.getFill()};
|
||||
}
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteamMax(Context context, Arguments args) {
|
||||
return new Object[] {steam.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getWater(Context context, Arguments args) {
|
||||
return new Object[] {feed.getFill()};
|
||||
}
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getWaterMax(Context context, Arguments args) {
|
||||
return new Object[] {feed.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@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[] getInfo(Context context, Arguments args) {
|
||||
FluidType type = steam.getTankType();
|
||||
@ -370,11 +375,11 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
else if(type == Fluids.HOTSTEAM) {type_1 = "1";}
|
||||
else if(type == Fluids.SUPERHOTSTEAM) {type_1 = "2";}
|
||||
else if(type == Fluids.ULTRAHOTSTEAM) {type_1 = "3";}
|
||||
else {type_1 = "Unknown Error";}
|
||||
return new Object[] {heat, steam.getFill(), steam.getMaxFill(), feed.getFill(), feed.getMaxFill(), type_1};
|
||||
else {type_1 = "Steam out-of-bounds";}
|
||||
return new Object[] {heat, steam.getFill(), steam.getMaxFill(), feed.getFill(), feed.getMaxFill(), type_1, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteamType(Context context, Arguments args) {
|
||||
FluidType type = steam.getTankType();
|
||||
@ -385,6 +390,8 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
else {return new Object[] {"Unknown Error"};}
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setSteamType(Context context, Arguments args) {
|
||||
int type = args.checkInteger(0);
|
||||
if(type > 3) {
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
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.nbt.NBTTagCompound;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase implements SimpleComponent {
|
||||
@ -128,32 +126,37 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
|
||||
return "rbmk_control_rod";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getLevel(Context context, Arguments args) {
|
||||
return new Object[] {getMult() * 100};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTargetLevel(Context context, Arguments args) {
|
||||
return new Object[] {targetLevel * 100};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, getMult() * 100, targetLevel * 100};
|
||||
return new Object[] {heat, getMult() * 100, targetLevel * 100, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setLevel(Context context, Arguments args) {
|
||||
double newLevel = args.checkDouble(0)/100.0;
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -9,16 +7,17 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
|
||||
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.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
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 java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAcceptor, IFluidStandardReceiver, SimpleComponent {
|
||||
@ -150,27 +149,33 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
||||
return "rbmk_cooler";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[]{heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryo(Context context, Arguments args) {
|
||||
return new Object[]{tank.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryoMax(Context context, Arguments args) {
|
||||
return new Object[]{tank.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[]{heat, tank.getFill(), tank.getMaxFill()};
|
||||
return new Object[]{heat, tank.getFill(), tank.getMaxFill(), xCoord, yCoord, zCoord};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -18,20 +16,21 @@ import com.hbm.inventory.gui.GUIRBMKHeater;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
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 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.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")})
|
||||
public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, SimpleComponent {
|
||||
@ -281,51 +280,57 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
return "rbmk_heater";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFill(Context context, Arguments args) {
|
||||
return new Object[] {feed.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFillMax(Context context, Arguments args) {
|
||||
return new Object[] {feed.getMaxFill()};
|
||||
}
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExport(Context context, Arguments args) {
|
||||
return new Object[] {steam.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExportMax(Context context, Arguments args) {
|
||||
return new Object[] {steam.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFillType(Context context, Arguments args) {
|
||||
return new Object[] {feed.getTankType().getID()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExportType(Context context, Arguments args) {
|
||||
return new Object[] {steam.getTankType().getID()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, feed.getFill(), feed.getMaxFill(), steam.getFill(), steam.getMaxFill(), feed.getTankType().getID(), steam.getTankType().getID()};
|
||||
return new Object[] {heat, feed.getFill(), feed.getMaxFill(), steam.getFill(), steam.getMaxFill(), feed.getTankType().getID(), steam.getTankType().getID(), xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
@ -12,8 +13,6 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -227,28 +226,34 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
return "rbmk_outgasser";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGas(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGasMax(Context context, Arguments args) {
|
||||
return new Object[] {gas.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getProgress(Context context, Arguments args) {
|
||||
return new Object[] {progress};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress};
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,8 +2,14 @@ package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
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;
|
||||
|
||||
public class TileEntityRBMKReflector extends TileEntityRBMKBase {
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKReflector extends TileEntityRBMKBase implements SimpleComponent {
|
||||
|
||||
@Override
|
||||
public void onMelt(int reduce) {
|
||||
@ -16,6 +22,22 @@ public class TileEntityRBMKReflector extends TileEntityRBMKBase {
|
||||
|
||||
super.onMelt(reduce);
|
||||
}
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "rbmk_reflector_rod";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ColumnType getConsoleType() {
|
||||
|
||||
@ -11,7 +11,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemRBMKRod;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -385,25 +384,25 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return "rbmk_fuel_rod";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluxSlow(Context context, Arguments args) {
|
||||
return new Object[] {fluxSlow};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluxFast(Context context, Arguments args) {
|
||||
return new Object[] {fluxFast};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getDepletion(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -412,7 +411,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getXenonPoison(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -421,7 +420,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoreHeat(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -430,7 +429,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSkinHeat(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -439,7 +438,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
Object OC_enrich_buf;
|
||||
@ -451,7 +450,19 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
OC_enrich_buf = "N/A";
|
||||
OC_poison_buf = "N/A";
|
||||
}
|
||||
return new Object[] {heat, fluxSlow, fluxFast, OC_enrich_buf, OC_poison_buf};
|
||||
return new Object[] {heat, fluxSlow, fluxFast, OC_enrich_buf, OC_poison_buf, ((RBMKRod)this.getBlockType()).moderated, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getModerated(Context context, Arguments args) {
|
||||
return new Object[] {((RBMKRod)this.getBlockType()).moderated};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,16 +4,21 @@ 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;
|
||||
|
||||
public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements IRBMKLoadable {
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements IRBMKLoadable, SimpleComponent {
|
||||
|
||||
public TileEntityRBMKStorage() {
|
||||
super(12);
|
||||
@ -86,6 +91,35 @@ public class TileEntityRBMKStorage extends TileEntityRBMKSlottedBase implements
|
||||
slots[0] = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "rbmk_storage_rod";
|
||||
}
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@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 = 4)
|
||||
@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