Class ServerUtil

java.lang.Object
com.hammy275.immersivemc.server.ServerUtil

public class ServerUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.ItemStack
    parseItem(net.minecraft.nbt.CompoundTag nbt, int lastVanillaDataVersion)
    Loads an item from NBT, upgrading it between Minecraft versions as needed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerUtil

      public ServerUtil()
  • Method Details

    • parseItem

      public static net.minecraft.world.item.ItemStack parseItem(net.minecraft.nbt.CompoundTag nbt, int lastVanillaDataVersion)
      Loads an item from NBT, upgrading it between Minecraft versions as needed.
      Parameters:
      nbt - The NBT being loaded.
      lastVanillaDataVersion - The last vanilla data version used to save the item.
      Returns:
      The loaded ItemStack.