super.writeData(output);
output.writeShort(getDurability());
Block[] mod = getStrengthModifiedBlocks();
output.writeShort((short) mod.length);
for (int i = 0; i < mod.length; i++) {
Block block = mod[i];
if (block instanceof CustomBlock) {
output.writeInt(((CustomBlock)block).getCustomId());
output.writeShort((short) -1);
} else {
output.writeInt(block.getRawId());
output.writeShort((short) block.getRawData());
}
output.writeFloat(getStrengthModifier(block));
}
}