Removed unused function, cleaned up NBT read write
This commit is contained in:
		| @@ -365,7 +365,15 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|     @Override |     @Override | ||||||
|     public void readFromNBT(NBTTagCompound nbt) { |     public void readFromNBT(NBTTagCompound nbt) { | ||||||
|         super.readFromNBT(nbt); |         super.readFromNBT(nbt); | ||||||
|  |         readNBT(nbt); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public void readItemFromNBT(NBTTagCompound nbt) { | ||||||
|  |         readNBT(nbt); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void readNBT(NBTTagCompound nbt) | ||||||
|  |     { | ||||||
|         energy.readFromNBT(nbt); |         energy.readFromNBT(nbt); | ||||||
|  |  | ||||||
|         if (nbt.hasKey(RedstoneMode.NBT)) { |         if (nbt.hasKey(RedstoneMode.NBT)) { | ||||||
| @@ -376,23 +384,16 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|     @Override |     @Override | ||||||
|     public void writeToNBT(NBTTagCompound nbt) { |     public void writeToNBT(NBTTagCompound nbt) { | ||||||
|         super.writeToNBT(nbt); |         super.writeToNBT(nbt); | ||||||
|  |         writeNBT(nbt); | ||||||
|         energy.writeToNBT(nbt); |  | ||||||
|  |  | ||||||
|         nbt.setInteger(RedstoneMode.NBT, redstoneMode.id); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public void readItemFromNBT(NBTTagCompound nbt) { |  | ||||||
|         energy.readFromNBT(nbt); |  | ||||||
|  |  | ||||||
|         if (nbt.hasKey(RedstoneMode.NBT)) { |  | ||||||
|             redstoneMode = RedstoneMode.getById(nbt.getInteger(RedstoneMode.NBT)); |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public void writeItemToNBT(NBTTagCompound nbt) { |     public void writeItemToNBT(NBTTagCompound nbt) { | ||||||
|         energy.writeToNBT(nbt); |         writeNBT(nbt); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void writeNBT(NBTTagCompound nbt) | ||||||
|  |     { | ||||||
|  |         energy.writeToNBT(nbt); | ||||||
|         nbt.setInteger(RedstoneMode.NBT, redstoneMode.id); |         nbt.setInteger(RedstoneMode.NBT, redstoneMode.id); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -597,9 +598,4 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|             drainEnergyFromWirelessGrid(player, ItemWirelessGrid.USAGE_PUSH); |             drainEnergyFromWirelessGrid(player, ItemWirelessGrid.USAGE_PUSH); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public void setEnergyStored(int energyStored) { |  | ||||||
|         if (energyStored > 0) this.energy.setEnergyStored(energyStored); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tom Erik
					Tom Erik