diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-05-31 21:23:10 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-05-31 21:23:10 +0300 |
| commit | 50d62a1298f05d6d440a5bc261a0fdf9ffece893 (patch) | |
| tree | a23ad25c213978306a5c9f5e747566b01802078b /ihl/flexible_cable/PowerCableNodeEntity.java | |
| parent | ec543445cec03fb1d638fd8aab87daebb3b1c534 (diff) | |
energy net fix attempt
Diffstat (limited to 'ihl/flexible_cable/PowerCableNodeEntity.java')
| -rw-r--r-- | ihl/flexible_cable/PowerCableNodeEntity.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ihl/flexible_cable/PowerCableNodeEntity.java b/ihl/flexible_cable/PowerCableNodeEntity.java index ed5a7ea..7396967 100644 --- a/ihl/flexible_cable/PowerCableNodeEntity.java +++ b/ihl/flexible_cable/PowerCableNodeEntity.java @@ -21,8 +21,8 @@ import net.minecraft.world.World; public class PowerCableNodeEntity extends NodeEntity implements IEnergyNetNode{
- private Set<NBTTagCompound> cableList;
- private NBTTagCompound cable;
+ private Set<IHLCable> cableList;
+ private IHLCable cable;
private double soundRange=10d;
private final static float groundConductivity=0.005f;
private int lastCheckTimer=0;
@@ -138,7 +138,7 @@ public class PowerCableNodeEntity extends NodeEntity implements IEnergyNetNode{ super.writeEntityToNBT(nbt);
if(this.cable!=null)
{
- nbt.setTag("cable",this.cable);
+ nbt.setTag("cable",this.cable.toNBT());
}
}
@@ -162,7 +162,7 @@ public class PowerCableNodeEntity extends NodeEntity implements IEnergyNetNode{ {
if(this.cable!=null)
{
- return this.cable.getInteger("maxVoltage");
+ return this.cable.maxVoltage;
}
else
{
@@ -173,15 +173,15 @@ public class PowerCableNodeEntity extends NodeEntity implements IEnergyNetNode{ @Override
public boolean addCable(NBTTagCompound cable1)
{
- this.cable=cable1;
+ this.cable=IHLCable.fromNBT(cable1);
return true;
}
@Override
- public Set<NBTTagCompound> getCableList() {
+ public Set<IHLCable> getCableList() {
if(cableList==null)
{
- cableList=new HashSet<NBTTagCompound>(1);
+ cableList=new HashSet<IHLCable>(1);
if(this.cable!=null)
{
cableList.add(this.cable);
@@ -212,7 +212,7 @@ public class PowerCableNodeEntity extends NodeEntity implements IEnergyNetNode{ }
@Override
- public void remove(NBTTagCompound cable)
+ public void remove(IHLCable cable)
{
this.cableList.remove(cable);
}
|
