Added send/recieve item filters to the Dimensional Transceiver

This commit is contained in:
CrazyPants committed 2014-11-27 20:30:57 +08:00
1 parent 04632dbc5f
commit eed3d7b9af
23 files changed
+558 -95

No files matched your search

@@ -273,6 +273,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
return VecmathUtil.clamp(Math.round(scale * ((float)storedEnergyRF / getMaxEnergyStored())), 0, scale);
}
@Override
public int getEnergyStored() {
return storedEnergyRF;
}
@@ -527,6 +528,9 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
readCommon(nbtRoot);
}
/**
* Read state common to both block and item
*/
public void readCommon(NBTTagCompound nbtRoot) {
setCapacitor(Capacitors.values()[nbtRoot.getShort("capacitorType")]);
@@ -592,6 +596,9 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
writeCommon(nbtRoot);
}
/**
* Write state common to both block and item
*/
public void writeCommon(NBTTagCompound nbtRoot) {
nbtRoot.setInteger("storedEnergyRF", storedEnergyRF);
nbtRoot.setShort("capacitorType", (short) capacitorType.ordinal());