Migrations
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user