Package com.hammy275.immersivemc.server
Class ServerUtil
java.lang.Object
com.hammy275.immersivemc.server.ServerUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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.
-