Migrations
This commit is contained in:
@@ -23,9 +23,9 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -45,13 +45,13 @@ public abstract class AEBaseInvTileEntity extends AEBaseTileEntity implements IA
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
final IItemHandler inv = this.getInternalInventory();
|
||||
if (inv != EmptyHandler.INSTANCE) {
|
||||
final CompoundNBT opt = data.getCompound("inv");
|
||||
final CompoundTag opt = data.getCompound("inv");
|
||||
for (int x = 0; x < inv.getSlots(); x++) {
|
||||
final CompoundNBT item = opt.getCompound("item" + x);
|
||||
final CompoundTag item = opt.getCompound("item" + x);
|
||||
ItemHandlerUtil.setStackInSlot(inv, x, ItemStack.read(item));
|
||||
}
|
||||
}
|
||||
@@ -60,13 +60,13 @@ public abstract class AEBaseInvTileEntity extends AEBaseTileEntity implements IA
|
||||
public abstract @Nonnull IItemHandler getInternalInventory();
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
final IItemHandler inv = this.getInternalInventory();
|
||||
if (inv != EmptyHandler.INSTANCE) {
|
||||
final CompoundNBT opt = new CompoundNBT();
|
||||
final CompoundTag opt = new CompoundTag();
|
||||
for (int x = 0; x < inv.getSlots(); x++) {
|
||||
final CompoundNBT item = new CompoundNBT();
|
||||
final CompoundTag item = new CompoundTag();
|
||||
final ItemStack is = inv.getStackInSlot(x);
|
||||
if (!is.isEmpty()) {
|
||||
is.write(item);
|
||||
|
||||
@@ -32,13 +32,13 @@ import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
@@ -105,7 +105,7 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
|
||||
if (data.contains("customName")) {
|
||||
@@ -124,7 +124,7 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
|
||||
if (this.canBeRotated()) {
|
||||
@@ -159,8 +159,8 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
* This builds a tag with the actual data that should be sent to the client for
|
||||
* update syncs. If the tile entity doesn't need update syncs, it returns null.
|
||||
*/
|
||||
private CompoundNBT writeUpdateData() {
|
||||
final CompoundNBT data = new CompoundNBT();
|
||||
private CompoundTag writeUpdateData() {
|
||||
final CompoundTag data = new CompoundTag();
|
||||
|
||||
final PacketBuffer stream = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
@@ -202,11 +202,11 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
* chunk.
|
||||
*/
|
||||
@Override
|
||||
public CompoundNBT getUpdateTag() {
|
||||
final CompoundNBT data = this.writeUpdateData();
|
||||
public CompoundTag getUpdateTag() {
|
||||
final CompoundTag data = this.writeUpdateData();
|
||||
|
||||
if (data == null) {
|
||||
return new CompoundNBT();
|
||||
return new CompoundTag();
|
||||
}
|
||||
|
||||
data.putInt("x", this.pos.getX());
|
||||
@@ -220,7 +220,7 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
* chunk.
|
||||
*/
|
||||
@Override
|
||||
public void handleUpdateTag(CompoundNBT tag) {
|
||||
public void handleUpdateTag(CompoundTag tag) {
|
||||
final PacketBuffer stream = new PacketBuffer(Unpooled.copiedBuffer(tag.getByteArray("X")));
|
||||
|
||||
if (this.readUpdateData(stream)) {
|
||||
@@ -320,7 +320,7 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
* @param from source of settings
|
||||
* @param compound compound of source
|
||||
*/
|
||||
public void uploadSettings(final SettingsFrom from, final CompoundNBT compound) {
|
||||
public void uploadSettings(final SettingsFrom from, final CompoundTag compound) {
|
||||
if (this instanceof IConfigurableObject) {
|
||||
final IConfigManager cm = ((IConfigurableObject) this).getConfigManager();
|
||||
if (cm != null) {
|
||||
@@ -370,11 +370,11 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
||||
*
|
||||
* @return compound of source
|
||||
*/
|
||||
public CompoundNBT downloadSettings(final SettingsFrom from) {
|
||||
final CompoundNBT output = new CompoundNBT();
|
||||
public CompoundTag downloadSettings(final SettingsFrom from) {
|
||||
final CompoundTag output = new CompoundTag();
|
||||
|
||||
if (this.hasCustomInventoryName()) {
|
||||
final CompoundNBT dsp = new CompoundNBT();
|
||||
final CompoundTag dsp = new CompoundTag();
|
||||
dsp.putString("Name", this.customName);
|
||||
output.put("display", dsp);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.client.render.model.AEModelData;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
@@ -86,7 +86,7 @@ public class CraftingMonitorTileEntity extends CraftingTileEntity implements ICo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
if (data.contains("paintedColor")) {
|
||||
this.paintedColor = AEColor.values()[data.getByte("paintedColor")];
|
||||
@@ -94,7 +94,7 @@ public class CraftingMonitorTileEntity extends CraftingTileEntity implements ICo
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putByte("paintedColor", (byte) this.paintedColor.ordinal());
|
||||
return data;
|
||||
|
||||
@@ -28,12 +28,12 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
@@ -64,7 +64,7 @@ import appeng.util.Platform;
|
||||
public class CraftingTileEntity extends AENetworkTileEntity implements IAEMultiBlock, IPowerChannelState {
|
||||
|
||||
private final CraftingCPUCalculator calc = new CraftingCPUCalculator(this);
|
||||
private CompoundNBT previousState = null;
|
||||
private CompoundTag previousState = null;
|
||||
private boolean isCoreBlock = false;
|
||||
private CraftingCPUCluster cluster;
|
||||
|
||||
@@ -181,7 +181,7 @@ public class CraftingTileEntity extends AENetworkTileEntity implements IAEMultiB
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putBoolean("core", this.isCoreBlock());
|
||||
if (this.isCoreBlock() && this.cluster != null) {
|
||||
@@ -191,7 +191,7 @@ public class CraftingTileEntity extends AENetworkTileEntity implements IAEMultiB
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.setCoreBlock(data.getBoolean("core"));
|
||||
if (this.isCoreBlock()) {
|
||||
@@ -323,11 +323,11 @@ public class CraftingTileEntity extends AENetworkTileEntity implements IAEMultiB
|
||||
this.isCoreBlock = isCoreBlock;
|
||||
}
|
||||
|
||||
public CompoundNBT getPreviousState() {
|
||||
public CompoundTag getPreviousState() {
|
||||
return this.previousState;
|
||||
}
|
||||
|
||||
public void setPreviousState(final CompoundNBT previousState) {
|
||||
public void setPreviousState(final CompoundTag previousState) {
|
||||
this.previousState = previousState;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ public class CraftingTileEntity extends AENetworkTileEntity implements IAEMultiB
|
||||
return connections;
|
||||
}
|
||||
|
||||
private boolean isConnected(IBlockReader world, BlockPos pos, Direction side) {
|
||||
private boolean isConnected(BlockView world, BlockPos pos, Direction side) {
|
||||
BlockPos adjacentPos = pos.offset(side);
|
||||
return world.getBlockState(adjacentPos).getBlock() instanceof AbstractCraftingUnitBlock;
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
@@ -201,12 +201,12 @@ public class MolecularAssemblerTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
if (this.forcePlan && this.myPlan != null) {
|
||||
final ItemStack pattern = this.myPlan.getPattern();
|
||||
if (!pattern.isEmpty()) {
|
||||
final CompoundNBT compound = new CompoundNBT();
|
||||
final CompoundTag compound = new CompoundTag();
|
||||
pattern.write(compound);
|
||||
data.put("myPlan", compound);
|
||||
data.putInt("pushDirection", this.pushDirection.ordinal());
|
||||
@@ -219,7 +219,7 @@ public class MolecularAssemblerTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
if (data.contains("myPlan")) {
|
||||
final ItemStack myPat = ItemStack.read(data.getCompound("myPlan"));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -37,13 +37,13 @@ public abstract class AENetworkInvTileEntity extends AEBaseInvTileEntity impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.getProxy().readFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.getProxy().writeToNBT(data);
|
||||
return data;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -39,13 +39,13 @@ public abstract class AENetworkPowerTileEntity extends AEBasePoweredTileEntity i
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.getProxy().readFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.getProxy().writeToNBT(data);
|
||||
return data;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -39,13 +39,13 @@ public class AENetworkTileEntity extends AEBaseTileEntity implements IActionHost
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.getProxy().readFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.getProxy().writeToNBT(data);
|
||||
return data;
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.RangedWrapper;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Iterator;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
@@ -60,16 +60,16 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
|
||||
return this.inv[var1];
|
||||
}
|
||||
|
||||
public void writeToNBT(final CompoundNBT data, final String name) {
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
public void writeToNBT(final CompoundTag data, final String name) {
|
||||
final CompoundTag c = new CompoundTag();
|
||||
this.writeToNBT(c);
|
||||
data.put(name, c);
|
||||
}
|
||||
|
||||
private void writeToNBT(final CompoundNBT target) {
|
||||
private void writeToNBT(final CompoundTag target) {
|
||||
for (int x = 0; x < this.size; x++) {
|
||||
try {
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
final CompoundTag c = new CompoundTag();
|
||||
|
||||
if (this.inv[x] != null) {
|
||||
this.inv[x].writeToNBT(c);
|
||||
@@ -81,17 +81,17 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
|
||||
}
|
||||
}
|
||||
|
||||
public void readFromNBT(final CompoundNBT data, final String name) {
|
||||
final CompoundNBT c = data.getCompound(name);
|
||||
public void readFromNBT(final CompoundTag data, final String name) {
|
||||
final CompoundTag c = data.getCompound(name);
|
||||
if (c != null) {
|
||||
this.readFromNBT(c);
|
||||
}
|
||||
}
|
||||
|
||||
private void readFromNBT(final CompoundNBT target) {
|
||||
private void readFromNBT(final CompoundTag target) {
|
||||
for (int x = 0; x < this.size; x++) {
|
||||
try {
|
||||
final CompoundNBT c = target.getCompound("#" + x);
|
||||
final CompoundTag c = target.getCompound("#" + x);
|
||||
|
||||
if (c != null) {
|
||||
this.inv[x] = AEItemStack.fromNBT(c);
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Iterator;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
|
||||
import appeng.util.Platform;
|
||||
@@ -146,18 +146,18 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeToNBT(final CompoundNBT data, final String name) {
|
||||
public void writeToNBT(final CompoundTag data, final String name) {
|
||||
data.put(name, this.serializeNBT());
|
||||
}
|
||||
|
||||
public void readFromNBT(final CompoundNBT data, final String name) {
|
||||
final CompoundNBT c = data.getCompound(name);
|
||||
public void readFromNBT(final CompoundTag data, final String name) {
|
||||
final CompoundTag c = data.getCompound(name);
|
||||
if (c != null) {
|
||||
this.readFromNBT(c);
|
||||
}
|
||||
}
|
||||
|
||||
public void readFromNBT(final CompoundNBT data) {
|
||||
public void readFromNBT(final CompoundTag data) {
|
||||
this.deserializeNBT(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.tile.misc;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
@@ -94,7 +94,7 @@ public class CellWorkbenchTileEntity extends AEBaseTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.cell.writeToNBT(data, "cell");
|
||||
this.config.writeToNBT(data, "config");
|
||||
@@ -103,7 +103,7 @@ public class CellWorkbenchTileEntity extends AEBaseTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.cell.readFromNBT(data, "cell");
|
||||
this.config.readFromNBT(data, "config");
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -22,9 +22,9 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
@@ -86,7 +86,7 @@ public class CondenserTileEntity extends AEBaseInvTileEntity implements IConfigM
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.cm.writeToNBT(data);
|
||||
data.putDouble("storedPower", this.getStoredPower());
|
||||
@@ -94,7 +94,7 @@ public class CondenserTileEntity extends AEBaseInvTileEntity implements IConfigM
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.cm.readFromNBT(data);
|
||||
this.setStoredPower(data.getDouble("storedPower"));
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
@@ -77,12 +77,12 @@ public final class InscriberRecipes {
|
||||
String name = "";
|
||||
|
||||
if (!plateA.isEmpty()) {
|
||||
final CompoundNBT tag = plateA.getOrCreateTag();
|
||||
final CompoundTag tag = plateA.getOrCreateTag();
|
||||
name += tag.getString(MaterialItem.TAG_INSCRIBE_NAME);
|
||||
}
|
||||
|
||||
if (!plateB.isEmpty()) {
|
||||
final CompoundNBT tag = plateB.getOrCreateTag();
|
||||
final CompoundTag tag = plateB.getOrCreateTag();
|
||||
name += " " + tag.getString(MaterialItem.TAG_INSCRIBE_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -127,7 +127,7 @@ public class InscriberTileEntity extends AENetworkPowerTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.upgrades.writeToNBT(data, "upgrades");
|
||||
this.settings.writeToNBT(data);
|
||||
@@ -135,7 +135,7 @@ public class InscriberTileEntity extends AENetworkPowerTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.upgrades.readFromNBT(data, "upgrades");
|
||||
this.settings.readFromNBT(data);
|
||||
|
||||
@@ -29,11 +29,11 @@ import com.google.common.collect.ImmutableSet;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
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.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -150,7 +150,7 @@ public class InterfaceTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putBoolean("omniDirectional", this.omniDirectional);
|
||||
this.duality.writeToNBT(data);
|
||||
@@ -158,7 +158,7 @@ public class InterfaceTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.omniDirectional = data.getBoolean("omniDirectional");
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.LightType;
|
||||
@@ -67,7 +67,7 @@ public class PaintSplotchesTileEntity extends AEBaseTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
final PacketBuffer myDat = new PacketBuffer(Unpooled.buffer());
|
||||
this.writeBuffer(myDat);
|
||||
@@ -91,7 +91,7 @@ public class PaintSplotchesTileEntity extends AEBaseTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
if (data.contains("dots")) {
|
||||
this.readBuffer(new PacketBuffer(Unpooled.copiedBuffer(data.getByteArray("dots"))));
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.api.implementations.IPowerChannelState;
|
||||
import appeng.api.implementations.tiles.ICrystalGrowthAccelerator;
|
||||
|
||||
@@ -26,11 +26,11 @@ import java.util.Map;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -149,7 +149,7 @@ public class SecurityStationTileEntity extends AENetworkTileEntity implements IT
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.cm.writeToNBT(data);
|
||||
data.putByte("paintedColor", (byte) this.paintedColor.ordinal());
|
||||
@@ -157,11 +157,11 @@ public class SecurityStationTileEntity extends AENetworkTileEntity implements IT
|
||||
data.putLong("securityKey", this.securityKey);
|
||||
this.getConfigSlot().writeToNBT(data, "config");
|
||||
|
||||
final CompoundNBT storedItems = new CompoundNBT();
|
||||
final CompoundTag storedItems = new CompoundTag();
|
||||
|
||||
int offset = 0;
|
||||
for (final IAEItemStack ais : this.inventory.getStoredItems()) {
|
||||
final CompoundNBT it = new CompoundNBT();
|
||||
final CompoundTag it = new CompoundTag();
|
||||
ais.createItemStack().write(it);
|
||||
storedItems.put(String.valueOf(offset), it);
|
||||
offset++;
|
||||
@@ -172,7 +172,7 @@ public class SecurityStationTileEntity extends AENetworkTileEntity implements IT
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.cm.readFromNBT(data);
|
||||
if (data.contains("paintedColor")) {
|
||||
@@ -182,11 +182,11 @@ public class SecurityStationTileEntity extends AENetworkTileEntity implements IT
|
||||
this.securityKey = data.getLong("securityKey");
|
||||
this.getConfigSlot().readFromNBT(data, "config");
|
||||
|
||||
final CompoundNBT storedItems = data.getCompound("storedItems");
|
||||
final CompoundTag storedItems = data.getCompound("storedItems");
|
||||
for (final Object key : storedItems.keySet()) {
|
||||
final INBT obj = storedItems.get((String) key);
|
||||
if (obj instanceof CompoundNBT) {
|
||||
this.inventory.getStoredItems().add(AEItemStack.fromItemStack(ItemStack.read((CompoundNBT) obj)));
|
||||
if (obj instanceof CompoundTag) {
|
||||
this.inventory.getStoredItems().add(AEItemStack.fromItemStack(ItemStack.read((CompoundTag) obj)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ 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 net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class VibrationChamberTileEntity extends AENetworkInvTileEntity implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putDouble("burnTime", this.getBurnTime());
|
||||
data.putDouble("maxBurnTime", this.getMaxBurnTime());
|
||||
@@ -101,7 +101,7 @@ public class VibrationChamberTileEntity extends AENetworkInvTileEntity implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.setBurnTime(data.getDouble("burnTime"));
|
||||
this.setMaxBurnTime(data.getDouble("maxBurnTime"));
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -68,13 +68,13 @@ public class CableBusTileEntity extends AEBaseTileEntity implements AEMultiTile
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.getCableBus().readFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.getCableBus().writeToNBT(data);
|
||||
return data;
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.tile.networking;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
@@ -90,14 +90,14 @@ public class EnergyCellTileEntity extends AENetworkTileEntity implements IAEPowe
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putDouble("internalCurrentPower", this.internalCurrentPower);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.internalCurrentPower = data.getDouble("internalCurrentPower");
|
||||
}
|
||||
@@ -108,16 +108,16 @@ public class EnergyCellTileEntity extends AENetworkTileEntity implements IAEPowe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadSettings(final SettingsFrom from, final CompoundNBT compound) {
|
||||
public void uploadSettings(final SettingsFrom from, final CompoundTag compound) {
|
||||
if (from == SettingsFrom.DISMANTLE_ITEM) {
|
||||
this.internalCurrentPower = compound.getDouble("internalCurrentPower");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT downloadSettings(final SettingsFrom from) {
|
||||
public CompoundTag downloadSettings(final SettingsFrom from) {
|
||||
if (from == SettingsFrom.DISMANTLE_ITEM) {
|
||||
final CompoundNBT tag = new CompoundNBT();
|
||||
final CompoundTag tag = new CompoundTag();
|
||||
tag.putDouble("internalCurrentPower", this.internalCurrentPower);
|
||||
tag.putDouble("internalMaxPower", this.getInternalMaxPower()); // used for tool tip.
|
||||
return tag;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.EnumSet;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -25,9 +25,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
@@ -78,14 +78,14 @@ public abstract class AEBasePoweredTileEntity extends AEBaseInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putDouble("internalCurrentPower", this.getInternalCurrentPower());
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.setInternalCurrentPower(data.getDouble("internalCurrentPower"));
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
import net.minecraftforge.client.model.data.ModelProperty;
|
||||
@@ -241,7 +241,7 @@ public class QuantumBridgeTileEntity extends AENetworkInvTileEntity implements I
|
||||
public long getQEFrequency() {
|
||||
final ItemStack is = this.internalInventory.getStackInSlot(0);
|
||||
if (!is.isEmpty()) {
|
||||
final CompoundNBT c = is.getTag();
|
||||
final CompoundTag c = is.getTag();
|
||||
if (c != null) {
|
||||
return c.getLong("freq");
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ package appeng.tile.spatial;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -63,14 +63,14 @@ public class SpatialIOPortTileEntity extends AENetworkInvTileEntity implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putInt("lastRedstoneState", this.lastRedstoneState.ordinal());
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
if (data.contains("lastRedstoneState")) {
|
||||
this.lastRedstoneState = YesNo.values()[data.getInt("lastRedstoneState")];
|
||||
|
||||
@@ -25,7 +25,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
import net.minecraftforge.client.model.data.ModelProperty;
|
||||
|
||||
@@ -29,11 +29,11 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
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.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
@@ -384,7 +384,7 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.config.readFromNBT(data);
|
||||
this.priority = data.getInt("priority");
|
||||
@@ -394,7 +394,7 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.config.writeToNBT(data);
|
||||
data.putInt("priority", this.priority);
|
||||
|
||||
@@ -32,7 +32,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
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.tileentity.TileEntityType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -242,14 +242,14 @@ public class DriveTileEntity extends AENetworkInvTileEntity implements IChestOrD
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.isCached = false;
|
||||
this.priority = data.getInt("priority");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
data.putInt("priority", this.priority);
|
||||
return data;
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -111,7 +111,7 @@ public class IOPortTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT write(final CompoundNBT data) {
|
||||
public CompoundTag write(final CompoundTag data) {
|
||||
super.write(data);
|
||||
this.manager.writeToNBT(data);
|
||||
this.upgrades.writeToNBT(data, "upgrades");
|
||||
@@ -120,7 +120,7 @@ public class IOPortTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
public void read(final CompoundTag data) {
|
||||
super.read(data);
|
||||
this.manager.readFromNBT(data);
|
||||
this.upgrades.readFromNBT(data, "upgrades");
|
||||
|
||||
Reference in New Issue
Block a user