1.16 port
This commit is contained in:
@@ -20,6 +20,7 @@ package appeng.tile.misc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
@@ -103,8 +104,8 @@ public class CellWorkbenchTileEntity extends AEBaseTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.cell.readFromNBT(data, "cell");
|
||||
this.config.readFromNBT(data, "config");
|
||||
this.manager.readFromNBT(data);
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.tile.misc;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
@@ -94,8 +95,8 @@ public class CondenserTileEntity extends AEBaseInvTileEntity implements IConfigM
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.cm.readFromNBT(data);
|
||||
this.setStoredPower(data.getDouble("storedPower"));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
@@ -135,8 +136,8 @@ public class InscriberTileEntity extends AENetworkPowerTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.upgrades.readFromNBT(data, "upgrades");
|
||||
this.settings.readFromNBT(data);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -158,8 +159,8 @@ public class InterfaceTileEntity extends AENetworkInvTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.omniDirectional = data.getBoolean("omniDirectional");
|
||||
|
||||
this.duality.readFromNBT(data);
|
||||
|
||||
@@ -36,7 +36,7 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.LightType;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
@@ -91,8 +91,8 @@ public class PaintSplotchesTileEntity extends AEBaseTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
if (data.contains("dots")) {
|
||||
this.readBuffer(new PacketBuffer(Unpooled.copiedBuffer(data.getByteArray("dots"))));
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public class PaintSplotchesTileEntity extends AEBaseTileEntity {
|
||||
return this.isLit;
|
||||
}
|
||||
|
||||
public void addBlot(final ItemStack type, final Direction side, final Vec3d hitVec) {
|
||||
public void addBlot(final ItemStack type, final Direction side, final Vector3d hitVec) {
|
||||
final BlockPos p = this.pos.offset(side);
|
||||
|
||||
final BlockState blk = this.world.getBlockState(p);
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -172,8 +173,8 @@ public class SecurityStationTileEntity extends AENetworkTileEntity implements IT
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.cm.readFromNBT(data);
|
||||
if (data.contains("paintedColor")) {
|
||||
this.paintedColor = AEColor.values()[data.getByte("paintedColor")];
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.io.IOException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
@@ -101,8 +102,8 @@ public class VibrationChamberTileEntity extends AENetworkInvTileEntity implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(final CompoundNBT data) {
|
||||
super.read(data);
|
||||
public void read(BlockState blockState, final CompoundNBT data) {
|
||||
super.read(blockState, data);
|
||||
this.setBurnTime(data.getDouble("burnTime"));
|
||||
this.setMaxBurnTime(data.getDouble("maxBurnTime"));
|
||||
this.setBurnSpeed(data.getInt("burnSpeed"));
|
||||
|
||||
Reference in New Issue
Block a user