Interface WorldStorage

All Known Implementing Classes:
AnvilStorage, ApothSalvagingTableStorage, BeaconStorage, CraftingTableStorage, ETableWorldStorage, GrindstoneStorage, ItemStorage, SmithingTableStorage

public interface WorldStorage
An object that can be written to and from NBT used with a WorldStorageHandler. Allows Immersives to hold items and persist them between world shutdowns if the block doesn't already handle holding items. For example, ImmersiveMC uses this for vanilla crafting tables, since crafting tables can't hold items on their own.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    load(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider, int lastVanillaDataVersion)
    Load from the NBT tag into this object.
    net.minecraft.nbt.CompoundTag
    save(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider)
    Save this object into the NBT tag.
  • Method Details

    • load

      void load(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider, int lastVanillaDataVersion)
      Load from the NBT tag into this object.
      Parameters:
      nbt - NBT tag to load from.
      provider - Provider for registry access.
      lastVanillaDataVersion - The last vanilla data version this storage was loaded in.
    • save

      net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider)
      Save this object into the NBT tag.
      Parameters:
      nbt - NBT tag to save to.
      provider - Provider for registry access.
      Returns:
      The same NBT tag as provided to this method.
    • getHandler

      WorldStorageHandler<? extends NetworkStorage> getHandler()
      Returns:
      Handler for this type of WorldStorage.