Migrations
This commit is contained in:
@@ -22,7 +22,7 @@ import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
import appeng.api.config.LevelEmitterMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -73,7 +73,7 @@ public final class ConfigManager implements IConfigManager {
|
||||
* @param tagCompound to be written to compound
|
||||
*/
|
||||
@Override
|
||||
public void writeToNBT(final CompoundNBT tagCompound) {
|
||||
public void writeToNBT(final CompoundTag tagCompound) {
|
||||
for (final Map.Entry<Settings, Enum<?>> entry : this.settings.entrySet()) {
|
||||
tagCompound.putString(entry.getKey().name(), this.settings.get(entry.getKey()).toString());
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public final class ConfigManager implements IConfigManager {
|
||||
* @param tagCompound to be read from compound
|
||||
*/
|
||||
@Override
|
||||
public void readFromNBT(final CompoundNBT tagCompound) {
|
||||
public void readFromNBT(final CompoundTag tagCompound) {
|
||||
for (final Map.Entry<Settings, Enum<?>> entry : this.settings.entrySet()) {
|
||||
try {
|
||||
if (tagCompound.contains(entry.getKey().name())) {
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.util;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
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;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class ItemComparisonHelper {
|
||||
* performance wise, so try an use shared tag compounds as long as the system
|
||||
* remains in AE.
|
||||
*/
|
||||
public boolean isNbtTagEqual(final CompoundNBT left, final CompoundNBT right) {
|
||||
public boolean isNbtTagEqual(final CompoundTag left, final CompoundTag right) {
|
||||
if (left == right) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user