Migrations

This commit is contained in:
Sebastian Hartte
2020-06-27 16:18:20 +02:00
parent d638d083c2
commit ba71a82288
303 changed files with 1216 additions and 1210 deletions
@@ -26,7 +26,7 @@ import javax.annotation.Nullable;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.api.distmarker.Dist;
@@ -76,7 +76,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return new AEItemStack(AEItemStackRegistry.getRegisteredStack(stack), stack.getCount());
}
public static IAEItemStack fromNBT(final CompoundNBT i) {
public static IAEItemStack fromNBT(final CompoundTag i) {
if (i == null) {
return null;
}
@@ -94,8 +94,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public void writeToNBT(final CompoundNBT i) {
final CompoundNBT itemStack = new CompoundNBT();
public void writeToNBT(final CompoundTag i) {
final CompoundTag itemStack = new CompoundTag();
this.getDefinition().write(itemStack);
i.put(NBT_ITEMSTACK, itemStack);
@@ -24,7 +24,7 @@ import com.google.common.base.Preconditions;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import appeng.api.config.FuzzyMode;
@@ -121,7 +121,7 @@ final class AESharedItemStack implements Comparable<AESharedItemStack> {
Preconditions.checkState(!stack.isEmpty(), "ItemStack#isEmpty() has to be false");
Preconditions.checkState(stack.getCount() == 1, "ItemStack#getCount() has to be 1");
final CompoundNBT tag = stack.hasTag() ? stack.getTag() : null;
final CompoundTag tag = stack.hasTag() ? stack.getTag() : null;
this.lower = this.makeLowerBound(stack, tag, fuzzy);
this.upper = this.makeUpperBound(stack, tag, fuzzy);
@@ -135,7 +135,7 @@ final class AESharedItemStack implements Comparable<AESharedItemStack> {
return this.upper;
}
private AESharedItemStack makeLowerBound(final ItemStack itemStack, final CompoundNBT tag,
private AESharedItemStack makeLowerBound(final ItemStack itemStack, final CompoundTag tag,
final FuzzyMode fuzzy) {
final ItemStack newDef = itemStack.copy();
@@ -158,7 +158,7 @@ final class AESharedItemStack implements Comparable<AESharedItemStack> {
return new AESharedItemStack(newDef);
}
private AESharedItemStack makeUpperBound(final ItemStack itemStack, final CompoundNBT tag,
private AESharedItemStack makeUpperBound(final ItemStack itemStack, final CompoundTag tag,
final FuzzyMode fuzzy) {
final ItemStack newDef = itemStack.copy();