mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Deprecate net.minecraftforge.common.util.Constants and inner classes to encourage usage of vanilla constants (#8140)
This commit is contained in:
1 parent
4a2572d545
commit
ebe375dac0
7 files changed
+118
-99
No files matched your search
@@ -19,11 +19,11 @@
|
||||
|
||||
package net.minecraftforge.items;
|
||||
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.INBTSerializable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@@ -200,8 +200,8 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
|
||||
@Override
|
||||
public void deserializeNBT(CompoundTag nbt)
|
||||
{
|
||||
setSize(nbt.contains("Size", Constants.NBT.TAG_INT) ? nbt.getInt("Size") : stacks.size());
|
||||
ListTag tagList = nbt.getList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
setSize(nbt.contains("Size", Tag.TAG_INT) ? nbt.getInt("Size") : stacks.size());
|
||||
ListTag tagList = nbt.getList("Items", Tag.TAG_COMPOUND);
|
||||
for (int i = 0; i < tagList.size(); i++)
|
||||
{
|
||||
CompoundTag itemTags = tagList.getCompound(i);
|
||||
|
||||
Reference in new issue
Block a user