summaryrefslogtreecommitdiff
path: root/ihl/flexible_cable/SubRTUEnergyNetNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'ihl/flexible_cable/SubRTUEnergyNetNode.java')
-rw-r--r--ihl/flexible_cable/SubRTUEnergyNetNode.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/ihl/flexible_cable/SubRTUEnergyNetNode.java b/ihl/flexible_cable/SubRTUEnergyNetNode.java
index ccb46b8..df5e9e4 100644
--- a/ihl/flexible_cable/SubRTUEnergyNetNode.java
+++ b/ihl/flexible_cable/SubRTUEnergyNetNode.java
@@ -19,7 +19,7 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
private RectifierTransformerUnitTileEntity base;
private short side;
private int gridID=-1;
- private Set<NBTTagCompound> cableList = new HashSet<NBTTagCompound>();
+ private Set<IHLCable> cableList = new HashSet<IHLCable>();
public SubRTUEnergyNetNode(RectifierTransformerUnitTileEntity base1, short facing1)
{
@@ -153,11 +153,11 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
@Override
public boolean addCable(NBTTagCompound cable)
{
- return this.cableList.add(cable);
+ return this.cableList.add(IHLCable.fromNBT(cable));
}
@Override
- public Set<NBTTagCompound> getCableList() {
+ public Set<IHLCable> getCableList() {
return cableList;
}
@@ -180,9 +180,9 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
{
NBTTagCompound nbt = new NBTTagCompound();
NBTTagList cableNBTList = new NBTTagList();
- for(NBTTagCompound cable:this.cableList)
+ for(IHLCable cable:this.cableList)
{
- cableNBTList.appendTag(cable);
+ cableNBTList.appendTag(cable.toNBT());
}
nbt.setTag("cableList", cableNBTList);
nbt.setInteger("gridID", this.gridID);
@@ -193,7 +193,7 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
NBTTagList cableNBTList=nbt.getTagList("cableList", 10);
for(int i=0;i<cableNBTList.tagCount();i++)
{
- this.cableList.add(cableNBTList.getCompoundTagAt(i));
+ this.cableList.add(IHLCable.fromNBT(cableNBTList.getCompoundTagAt(i)));
}
this.gridID=nbt.getInteger("gridID");
}
@@ -237,7 +237,7 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
}
@Override
- public void remove(NBTTagCompound cable)
+ public void remove(IHLCable cable)
{
if(this.cableList.remove(cable))
{
@@ -260,9 +260,9 @@ public class SubRTUEnergyNetNode implements IEnergyNetNode{
@Override
public boolean isCableRemoved(int chainUniqueID) {
- for(NBTTagCompound cable:this.cableList)
+ for(IHLCable cable:this.cableList)
{
- if(cable.getInteger("chainUID")==chainUniqueID)
+ if(cable.chainUID==chainUniqueID)
{
return false;
}