I want to suggest Instant NBT Maker for Items and Blocks, the idea is to allow item to have Predefined NBT Tags during creation process than by making the procedure that will make NBT Tag for the current item, this will allow us to make default properties such as our own EMC system for items and blocks or energy storage
How this will gonna work?
While making an item, there will be a list box "Similar to the one that Biome setting window has for mobs"
their user will be able to Create/Edit/Delete NBT Tag along with adding default values to it
in practice it should look like this
"Energy" = 0
"MaxEnergy" = 200
"IsOn" = false
Issue comments
Is this not the thing?
//This reads default storage Tags "NOTE: Tags need's to gave this exact names to work properly!"
public void readFromNBT(NBTTagCompound compound)
{
this.energy = compound.getInteger("Energy");
this.capacity = compound.getInteger("Capacity");
this.maxReceive = compound.getInteger("MaxReceive");
this.maxExtract = compound.getInteger("MaxExtract");
}
//This saves default storage Tags "NOTE: Tags need's to gave this exact names to work properly!"
public void writeToNBT(NBTTagCompound compound)
{
compound.setInteger("Energy", this.energy);
compound.setInteger("Capacity", this.capacity);
compound.setInteger("MaxReceive", this.maxReceive);
compound.setInteger("MaxExtract", this.maxExtract);
}
You define NBT tags when setting them in the procedures, there is no need to set them again there. For default item values, you could use on item crafted to set default NBT.