Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ReArmerStorage implements Capability.IStorage<IReArmer> {
- @Nullable
- @Override
- public INBT writeNBT(Capability<IReArmer> capability, IReArmer instance, Direction side) {
- CompoundNBT tag = new CompoundNBT();
- tag.putBoolean("isReArmed", instance.getReArmed());
- return tag;
- }
- @Override
- public void readNBT(Capability<IReArmer> capability, IReArmer instance, Direction side, INBT nbt) {
- CompoundNBT tag = (CompoundNBT) nbt;
- instance.setReArmed(tag.getBoolean("isReArmed"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement