Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public class ReArmerStorage implements Capability.IStorage<IReArmer> {
  2.  
  3. @Nullable
  4. @Override
  5. public INBT writeNBT(Capability<IReArmer> capability, IReArmer instance, Direction side) {
  6. CompoundNBT tag = new CompoundNBT();
  7. tag.putBoolean("isReArmed", instance.getReArmed());
  8. return tag;
  9. }
  10.  
  11. @Override
  12. public void readNBT(Capability<IReArmer> capability, IReArmer instance, Direction side, INBT nbt) {
  13. CompoundNBT tag = (CompoundNBT) nbt;
  14. instance.setReArmed(tag.getBoolean("isReArmed"));
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement