java.lang.Object
com.hammy275.immersivemc.common.immersive.storage.dual.impl.ItemStorage
com.hammy275.immersivemc.common.immersive.storage.dual.impl.AnvilStorage
All Implemented Interfaces:
NetworkStorage, WorldStorage

public class AnvilStorage extends ItemStorage
  • Field Details

    • xpLevels

      public int xpLevels
  • Constructor Details

    • AnvilStorage

      public AnvilStorage()
  • Method Details

    • getHandler

      public WorldStorageHandler<AnvilStorage> getHandler()
      Returns:
      Handler for this type of WorldStorage.
    • load

      public void load(net.minecraft.nbt.CompoundTag nbt, int lastVanillaDataVersion)
      Description copied from interface: WorldStorage
      Load from the NBT tag into this object.
      Specified by:
      load in interface WorldStorage
      Overrides:
      load in class ItemStorage
      Parameters:
      nbt - NBT tag to load from.
      lastVanillaDataVersion - The last vanilla data version this storage was loaded in.
    • save

      public net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag nbtIn)
      Description copied from interface: WorldStorage
      Save this object into the NBT tag.
      Specified by:
      save in interface WorldStorage
      Overrides:
      save in class ItemStorage
      Parameters:
      nbtIn - NBT tag to save to.
      Returns:
      The same NBT tag as provided to this method.
    • encode

      public void encode(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from interface: NetworkStorage
      Encode this storage into a buffer.
      Specified by:
      encode in interface NetworkStorage
      Overrides:
      encode in class ItemStorage
      Parameters:
      buffer - Buffer to encode storage into.
    • decode

      public void decode(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from interface: NetworkStorage
      Decode the buffer into this object.
      Specified by:
      decode in interface NetworkStorage
      Overrides:
      decode in class ItemStorage
      Parameters:
      buffer - Buffer to decode from.