Migrations
This commit is contained in:
@@ -27,7 +27,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
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.items.IItemHandler;
|
||||
@@ -83,7 +83,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
private final Map<IInterfaceHost, InvTracker> diList = new HashMap<>();
|
||||
private final Map<Long, InvTracker> byId = new HashMap<>();
|
||||
private IGrid grid;
|
||||
private CompoundNBT data = new CompoundNBT();
|
||||
private CompoundTag data = new CompoundTag();
|
||||
|
||||
public InterfaceTerminalContainer(int id, final PlayerInventory ip, final InterfaceTerminalPart anchor) {
|
||||
super(TYPE, id, ip, anchor);
|
||||
@@ -183,7 +183,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
// :P
|
||||
}
|
||||
|
||||
this.data = new CompoundNBT();
|
||||
this.data = new CompoundTag();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private void regenList(final CompoundNBT data) {
|
||||
private void regenList(final CompoundTag data) {
|
||||
this.byId.clear();
|
||||
this.diList.clear();
|
||||
|
||||
@@ -327,9 +327,9 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
return !ItemStack.areItemStacksEqual(a, b);
|
||||
}
|
||||
|
||||
private void addItems(final CompoundNBT data, final InvTracker inv, final int offset, final int length) {
|
||||
private void addItems(final CompoundTag data, final InvTracker inv, final int offset, final int length) {
|
||||
final String name = '=' + Long.toString(inv.which, Character.MAX_RADIX);
|
||||
final CompoundNBT tag = data.getCompound(name);
|
||||
final CompoundTag tag = data.getCompound(name);
|
||||
|
||||
if (tag.isEmpty()) {
|
||||
tag.putLong("sortBy", inv.sortBy);
|
||||
@@ -337,7 +337,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
}
|
||||
|
||||
for (int x = 0; x < length; x++) {
|
||||
final CompoundNBT itemNBT = new CompoundNBT();
|
||||
final CompoundTag itemNBT = new CompoundTag();
|
||||
|
||||
final ItemStack is = inv.server.getStackInSlot(x + offset);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
@@ -68,7 +68,7 @@ public class NetworkToolContainer extends AEBaseContainer {
|
||||
}
|
||||
|
||||
public void toggleFacadeMode() {
|
||||
final CompoundNBT data = this.toolInv.getItemStack().getOrCreateTag();
|
||||
final CompoundTag data = this.toolInv.getItemStack().getOrCreateTag();
|
||||
data.putBoolean("hideFacades", !data.getBoolean("hideFacades"));
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class NetworkToolContainer extends AEBaseContainer {
|
||||
}
|
||||
|
||||
if (this.isValidContainer()) {
|
||||
final CompoundNBT data = currentItem.getOrCreateTag();
|
||||
final CompoundTag data = currentItem.getOrCreateTag();
|
||||
this.setFacadeMode(data.getBoolean("hideFacades"));
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
@@ -235,7 +235,7 @@ public class PatternTermContainer extends MEMonitorableContainer
|
||||
}
|
||||
|
||||
// encode the slot.
|
||||
final CompoundNBT encodedValue = new CompoundNBT();
|
||||
final CompoundTag encodedValue = new CompoundTag();
|
||||
|
||||
final ListNBT tagIn = new ListNBT();
|
||||
final ListNBT tagOut = new ListNBT();
|
||||
@@ -316,7 +316,7 @@ public class PatternTermContainer extends MEMonitorableContainer
|
||||
}
|
||||
|
||||
private INBT createItemTag(final ItemStack i) {
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
final CompoundTag c = new CompoundTag();
|
||||
|
||||
if (!i.isEmpty()) {
|
||||
i.write(c);
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
@@ -120,7 +120,7 @@ public class QuartzKnifeContainer extends AEBaseContainer {
|
||||
if (RestrictedInputSlot.isMetalIngot(input)) {
|
||||
if (QuartzKnifeContainer.this.myName.length() > 0) {
|
||||
return AEApi.instance().definitions().materials().namePress().maybeStack(1).map(namePressStack -> {
|
||||
final CompoundNBT compound = namePressStack.getOrCreateTag();
|
||||
final CompoundTag compound = namePressStack.getOrCreateTag();
|
||||
compound.putString(MaterialItem.TAG_INSCRIBE_NAME, QuartzKnifeContainer.this.myName);
|
||||
|
||||
return namePressStack;
|
||||
|
||||
Reference in New Issue
Block a user