Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void readFromNBT(NBTTagCompound compound) {
- super.readFromNBT(compound);
- isFormed = compound.getBoolean("isFormed");
- checkBefore = compound.getBoolean("checkBefore");
- byte size = compound.getByte("Size");
- components.clear();
- for (int i = 0; i < size; i++) {
- String str = compound.getString("component" + i);
- components.add(MachineComponents.getFromString(str));
- }
- }
- @Override
- public void writeToNBT(NBTTagCompound compound) {
- super.writeToNBT(compound);
- compound.setBoolean("isFormed", isFormed);
- compound.setBoolean("checkBefore", checkBefore);
- compound.setByte("Size", (byte)components.size());
- for (int i = 0; i < components.size(); i++) {
- compound.setString("component" + i, components.get(i).getLocalizedName());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement