You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
Java
50 lines
1.5 KiB
Java
package net.brokenmoon.afloydwiremod.api;
|
|
|
|
import net.brokenmoon.afloydwiremod.gui.WiringButton;
|
|
import net.minecraft.src.NBTTagCompound;
|
|
|
|
public class WireConnection {
|
|
public int x;
|
|
public int y;
|
|
public int z;
|
|
public int thisslot;
|
|
public int thatslot;
|
|
|
|
public WireConnection(){
|
|
|
|
}
|
|
public WireConnection(int x, int y, int z, int thisslot){
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
this.thisslot = thisslot;
|
|
}
|
|
|
|
public WireConnection(int x, int y, int z, int thisslot, int thatslot){
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
this.thisslot = thisslot;
|
|
this.thatslot = thatslot;
|
|
}
|
|
|
|
public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) {
|
|
nbttagcompound.setInteger("wx", this.x);
|
|
nbttagcompound.setInteger("wy", this.y);
|
|
nbttagcompound.setInteger("wz", this.z);
|
|
nbttagcompound.setInteger("wthisslot", thisslot);
|
|
nbttagcompound.setInteger("wthatslot", thatslot);
|
|
System.out.println("Writing wires to nbt");
|
|
return nbttagcompound;
|
|
}
|
|
|
|
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
|
this.x = nbttagcompound.getInteger("wx");
|
|
this.y = nbttagcompound.getInteger("wy");
|
|
this.z = nbttagcompound.getInteger("wz");
|
|
this.thisslot = nbttagcompound.getInteger("wthisslot");
|
|
this.thatslot = nbttagcompound.getInteger("wthatslot");
|
|
System.out.println("Loading wires from nbt");
|
|
}
|
|
}
|