Migrations

This commit is contained in:
Sebastian Hartte
2020-06-27 16:18:20 +02:00
parent d638d083c2
commit ba71a82288
303 changed files with 1216 additions and 1210 deletions
+25 -23
View File
@@ -20,21 +20,23 @@ package appeng.block;
import javax.annotation.Nullable;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
@@ -50,7 +52,7 @@ public abstract class AEBaseBlock extends Block {
private boolean isFullSize = true;
private boolean isInventory = false;
protected AEBaseBlock(final Block.Properties props) {
protected AEBaseBlock(final Settings props) {
super(props);
}
@@ -58,7 +60,7 @@ public abstract class AEBaseBlock extends Block {
* Utility function to create block properties with some sensible defaults for
* AE blocks.
*/
public static Block.Properties defaultProps(Material material) {
public static Settings defaultProps(Material material) {
return defaultProps(material, material.getColor());
}
@@ -66,37 +68,37 @@ public abstract class AEBaseBlock extends Block {
* Utility function to create block properties with some sensible defaults for
* AE blocks.
*/
public static Block.Properties defaultProps(Material material, MaterialColor color) {
return Block.Properties.create(material, color)
public static Settings defaultProps(Material material, MaterialColor color) {
return Settings.create(material, color)
// These values previousls were encoded in AEBaseBlock
.hardnessAndResistance(2.2f, 11.f).harvestTool(ToolType.PICKAXE).harvestLevel(0)
.sound(getDefaultSoundByMaterial(material));
}
private static SoundType getDefaultSoundByMaterial(Material mat) {
private static BlockSoundGroup getDefaultSoundByMaterial(Material mat) {
if (mat == AEGlassMaterial.INSTANCE || mat == Material.GLASS) {
return SoundType.GLASS;
return BlockSoundGroup.GLASS;
} else if (mat == Material.ROCK) {
return SoundType.STONE;
return BlockSoundGroup.STONE;
} else if (mat == Material.WOOD) {
return SoundType.WOOD;
return BlockSoundGroup.WOOD;
} else {
return SoundType.METAL;
return BlockSoundGroup.METAL;
}
}
@Override
public boolean isNormalCube(BlockState state, IBlockReader worldIn, BlockPos pos) {
public boolean isNormalCube(BlockState state, BlockView worldIn, BlockPos pos) {
return this.isFullSize() && this.isOpaque();
}
@Override
public boolean hasComparatorInputOverride(BlockState state) {
public boolean hasComparatorOutput(BlockState state) {
return this.isInventory();
}
@Override
public int getComparatorInputOverride(BlockState state, final World worldIn, final BlockPos pos) {
public int getComparatorOutput(BlockState state, final World worldIn, final BlockPos pos) {
return 0;
}
@@ -129,9 +131,9 @@ public abstract class AEBaseBlock extends Block {
return false;
}
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
public final Direction mapRotation(final IOrientable ori, final Direction dir) {
@@ -206,7 +208,7 @@ public abstract class AEBaseBlock extends Block {
}
protected IOrientable getOrientable(final IBlockReader w, final BlockPos pos) {
protected IOrientable getOrientable(final BlockView w, final BlockPos pos) {
if (this instanceof IOrientableBlock) {
IOrientableBlock orientable = (IOrientableBlock) this;
return orientable.getOrientable(w, pos);
@@ -27,8 +27,8 @@ import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@@ -75,7 +75,7 @@ public class AEBaseBlockItem extends BlockItem {
}
@Override
public ActionResultType tryPlace(BlockItemUseContext context) {
public ActionResult tryPlace(BlockItemUseContext context) {
Direction up = null;
Direction forward = null;
@@ -125,11 +125,11 @@ public class AEBaseBlockItem extends BlockItem {
}
if (!this.blockType.isValidOrientation(context.getWorld(), context.getPos(), forward, up)) {
return ActionResultType.FAIL;
return ActionResult.FAIL;
}
ActionResultType result = super.tryPlace(context);
if (result != ActionResultType.SUCCESS) {
ActionResult result = super.tryPlace(context);
if (result != ActionResult.SUCCESS) {
return result;
}
@@ -139,7 +139,7 @@ public class AEBaseBlockItem extends BlockItem {
ori = tile;
if (tile == null) {
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
if (ori.canBeRotated() && !this.blockType.hasCustomRotation()) {
@@ -155,7 +155,7 @@ public class AEBaseBlockItem extends BlockItem {
ori.setOrientation(forward, up);
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
@@ -24,7 +24,7 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
@@ -61,7 +61,7 @@ public class AEBaseBlockItemChargeable extends AEBaseBlockItem implements IAEIte
final double internalMaxPower = this.getMaxEnergyCapacity();
if (internalMaxPower > 0) {
final CompoundNBT tag = stack.getTag();
final CompoundTag tag = stack.getTag();
if (tag != null) {
internalCurrentPower = tag.getDouble("internalCurrentPower");
}
@@ -135,12 +135,12 @@ public class AEBaseBlockItemChargeable extends AEBaseBlockItem implements IAEIte
}
private double getInternal(final ItemStack is) {
final CompoundNBT nbt = is.getOrCreateTag();
final CompoundTag nbt = is.getOrCreateTag();
return nbt.getDouble("internalCurrentPower");
}
private void setInternal(final ItemStack is, final double amt) {
final CompoundNBT nbt = is.getOrCreateTag();
final CompoundTag nbt = is.getOrCreateTag();
nbt.putDouble("internalCurrentPower", amt);
}
+19 -19
View File
@@ -33,16 +33,16 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.items.ItemHandlerHelper;
@@ -67,7 +67,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
@Nonnull
private Supplier<T> tileEntityFactory;
public AEBaseTileBlock(final Block.Properties props) {
public AEBaseTileBlock(final Settings props) {
super(props);
}
@@ -92,12 +92,12 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
@Nullable
public T getTileEntity(final IBlockReader w, final int x, final int y, final int z) {
public T getTileEntity(final BlockView w, final int x, final int y, final int z) {
return this.getTileEntity(w, new BlockPos(x, y, z));
}
@Nullable
public T getTileEntity(final IBlockReader w, final BlockPos pos) {
public T getTileEntity(final BlockView w, final BlockPos pos) {
if (!this.hasBlockTileEntity()) {
return null;
}
@@ -112,7 +112,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
@Override
public final TileEntity createTileEntity(BlockState state, IBlockReader world) {
public final TileEntity createTileEntity(BlockState state, BlockView world) {
return this.tileEntityFactory.get();
}
@@ -165,7 +165,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
@Override
public int getComparatorInputOverride(BlockState state, final World w, final BlockPos pos) {
public int getComparatorOutput(BlockState state, final World w, final BlockPos pos) {
final TileEntity te = this.getTileEntity(w, pos);
if (te instanceof AEBaseInvTileEntity) {
AEBaseInvTileEntity invTile = (AEBaseInvTileEntity) te;
@@ -202,7 +202,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player,
public ActionResult onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player,
Hand hand, BlockRayTraceResult hit) {
ItemStack heldItem;
if (player != null && !player.getHeldItem(hand).isEmpty()) {
@@ -215,11 +215,11 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
final AEBaseTileEntity tile = this.getTileEntity(world, pos);
if (tile == null) {
return ActionResultType.FAIL;
return ActionResult.FAIL;
}
if (tile instanceof CableBusTileEntity || tile instanceof SkyChestTileEntity) {
return ActionResultType.FAIL;
return ActionResult.FAIL;
}
final ItemStack[] itemDropCandidates = Platform.getBlockDrops(world, pos);
@@ -227,7 +227,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
for (final ItemStack ol : itemDropCandidates) {
if (Platform.itemComparisons().isEqualItemType(ol, op)) {
final CompoundNBT tag = tile.downloadSettings(SettingsFrom.DISMANTLE_ITEM);
final CompoundTag tag = tile.downloadSettings(SettingsFrom.DISMANTLE_ITEM);
if (tag != null) {
ol.setTag(tag);
}
@@ -240,7 +240,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
world.removeBlock(pos, false);
}
return ActionResultType.FAIL;
return ActionResult.FAIL;
}
if (heldItem.getItem() instanceof IMemoryCard && !(this instanceof CableBusBlock)) {
@@ -248,20 +248,20 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
final AEBaseTileEntity tileEntity = this.getTileEntity(world, pos);
if (tileEntity == null) {
return ActionResultType.FAIL;
return ActionResult.FAIL;
}
final String name = this.getTranslationKey();
if (player.isCrouching()) {
final CompoundNBT data = tileEntity.downloadSettings(SettingsFrom.MEMORY_CARD);
final CompoundTag data = tileEntity.downloadSettings(SettingsFrom.MEMORY_CARD);
if (data != null) {
memoryCard.setMemoryCardContents(heldItem, name, data);
memoryCard.notifyUser(player, MemoryCardMessages.SETTINGS_SAVED);
}
} else {
final String savedName = memoryCard.getSettingsName(heldItem);
final CompoundNBT data = memoryCard.getData(heldItem);
final CompoundTag data = memoryCard.getData(heldItem);
if (this.getTranslationKey().equals(savedName)) {
tileEntity.uploadSettings(SettingsFrom.MEMORY_CARD, data);
@@ -271,7 +271,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
@@ -279,7 +279,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBase
}
@Override
public IOrientable getOrientable(final IBlockReader w, final BlockPos pos) {
public IOrientable getOrientable(final BlockView w, final BlockPos pos) {
return this.getTileEntity(w, pos);
}
@@ -23,7 +23,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -41,7 +41,7 @@ public abstract class AbstractCraftingUnitBlock<T extends CraftingTileEntity> ex
public final CraftingUnitType type;
public AbstractCraftingUnitBlock(Block.Properties props, final CraftingUnitType type) {
public AbstractCraftingUnitBlock(Settings props, final CraftingUnitType type) {
super(props);
this.type = type;
this.setDefaultState(getDefaultState().with(FORMED, false).with(POWERED, false));
@@ -78,7 +78,7 @@ public abstract class AbstractCraftingUnitBlock<T extends CraftingTileEntity> ex
}
@Override
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
public ActionResult onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
BlockRayTraceResult hit) {
final CraftingTileEntity tg = this.getTileEntity(w, pos);
@@ -88,7 +88,7 @@ public abstract class AbstractCraftingUnitBlock<T extends CraftingTileEntity> ex
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return super.onBlockActivated(state, w, pos, p, hand, hit);
@@ -23,7 +23,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -39,7 +39,7 @@ public class MolecularAssemblerBlock extends AEBaseTileBlock<MolecularAssemblerT
public static final BooleanProperty POWERED = BooleanProperty.create("powered");
public MolecularAssemblerBlock(Block.Properties props) {
public MolecularAssemblerBlock(Settings props) {
super(props);
setDefaultState(getDefaultState().with(POWERED, false));
}
@@ -56,7 +56,7 @@ public class MolecularAssemblerBlock extends AEBaseTileBlock<MolecularAssemblerT
}
@Override
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
public ActionResult onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
BlockRayTraceResult hit) {
final MolecularAssemblerTileEntity tg = this.getTileEntity(w, pos);
if (tg != null && !p.isCrouching()) {
@@ -64,7 +64,7 @@ public class MolecularAssemblerBlock extends AEBaseTileBlock<MolecularAssemblerT
ContainerOpener.openContainer(MolecularAssemblerContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return super.onBlockActivated(state, w, pos, p, hand, hit);
@@ -27,16 +27,16 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
@@ -55,11 +55,11 @@ public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (player instanceof FakePlayer || player == null) {
this.dropCrank(w, pos);
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
final CrankTileEntity tile = this.getTileEntity(w, pos);
@@ -67,10 +67,10 @@ public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
if (tile.power()) {
AeStats.TurnedCranks.addToPlayer(player, 1);
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
private void dropCrank(final World world, final BlockPos pos) {
@@ -100,7 +100,7 @@ public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
return !(te instanceof CrankTileEntity) || this.isCrankable(w, pos, up.getOpposite());
}
private Direction findCrankable(final IBlockReader world, final BlockPos pos) {
private Direction findCrankable(final BlockView world, final BlockPos pos) {
for (final Direction dir : Direction.values()) {
if (this.isCrankable(world, pos, dir)) {
return dir;
@@ -109,7 +109,7 @@ public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
return null;
}
private boolean isCrankable(final IBlockReader world, final BlockPos pos, final Direction offset) {
private boolean isCrankable(final BlockView world, final BlockPos pos, final Direction offset) {
final BlockPos o = pos.offset(offset);
final TileEntity te = world.getTileEntity(o);
@@ -139,13 +139,13 @@ public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
return this.findCrankable(w, pos) != null;
}
private Direction getUp(IBlockReader world, BlockPos pos) {
private Direction getUp(BlockView world, BlockPos pos) {
CrankTileEntity crank = getTileEntity(world, pos);
return crank != null ? crank.getUp() : null;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
Direction up = getUp(world, pos);
if (up == null) {
@@ -23,7 +23,7 @@ import javax.annotation.Nullable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -42,7 +42,7 @@ public class GrinderBlock extends AEBaseTileBlock<GrinderTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
final GrinderTileEntity tg = this.getTileEntity(w, pos);
if (tg != null && !p.isCrouching()) {
@@ -50,8 +50,8 @@ public class GrinderBlock extends AEBaseTileBlock<GrinderTileEntity> {
ContainerOpener.openContainer(GrinderContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -20,10 +20,10 @@ package appeng.block.misc;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -42,10 +42,10 @@ public class CellWorkbenchBlock extends AEBaseTileBlock<CellWorkbenchTileEntity>
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final CellWorkbenchTileEntity tg = this.getTileEntity(w, pos);
@@ -53,8 +53,8 @@ public class CellWorkbenchBlock extends AEBaseTileBlock<CellWorkbenchTileEntity>
if (Platform.isServer()) {
CellWorkbenchContainer.open(p, ContainerLocator.forTileEntity(tg));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -27,7 +27,7 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.TransformationMatrix;
import net.minecraft.client.renderer.Vector3f;
@@ -35,16 +35,16 @@ import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -69,15 +69,15 @@ public class ChargerBlock extends AEBaseTileBlock<ChargerTileEntity> {
}
@Override
public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos) {
public int getOpacity(BlockState state, BlockView worldIn, BlockPos pos) {
return 2; // FIXME Double check this (esp. value range)
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (player.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
if (Platform.isServer()) {
@@ -87,7 +87,7 @@ public class ChargerBlock extends AEBaseTileBlock<ChargerTileEntity> {
}
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
@Override
@@ -120,7 +120,7 @@ public class ChargerBlock extends AEBaseTileBlock<ChargerTileEntity> {
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
final ChargerTileEntity tile = this.getTileEntity(w, pos);
if (tile != null) {
@@ -172,8 +172,8 @@ public class ChargerBlock extends AEBaseTileBlock<ChargerTileEntity> {
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView worldIn, BlockPos pos,
ShapeContext context) {
return VoxelShapes.create(new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 1.0, 1.0));
}
@@ -20,10 +20,10 @@ package appeng.block.misc;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -43,10 +43,10 @@ public class CondenserBlock extends AEBaseTileBlock<CondenserTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (player.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
if (Platform.isServer()) {
@@ -54,10 +54,10 @@ public class CondenserBlock extends AEBaseTileBlock<CondenserTileEntity> {
if (tc != null && !player.isCrouching()) {
ContainerOpener.openContainer(CondenserContainer.TYPE, player,
ContainerLocator.forTileEntitySide(tc, hit.getFace()));
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
@@ -23,11 +23,11 @@ import javax.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -43,13 +43,13 @@ public class InscriberBlock extends AEBaseTileBlock<InscriberTileEntity> {
}
@Override
public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos) {
public int getOpacity(BlockState state, BlockView worldIn, BlockPos pos) {
return 2; // FIXME validate this. a) possibly not required because of getShape b) value
// range. was 2 in 1.10
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (!p.isCrouching()) {
final InscriberTileEntity tg = this.getTileEntity(w, pos);
@@ -58,10 +58,10 @@ public class InscriberBlock extends AEBaseTileBlock<InscriberTileEntity> {
ContainerOpener.openContainer(InscriberContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
@@ -22,13 +22,13 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -62,10 +62,10 @@ public class InterfaceBlock extends AEBaseTileBlock<InterfaceTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final InterfaceTileEntity tg = this.getTileEntity(w, pos);
@@ -74,9 +74,9 @@ public class InterfaceBlock extends AEBaseTileBlock<InterfaceTileEntity> {
ContainerOpener.openContainer(InterfaceContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
@Override
@@ -22,17 +22,17 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
@@ -62,7 +62,7 @@ public class LightDetectorBlock extends AEBaseTileBlock<LightDetectorTileEntity>
}
@Override
public int getWeakPower(final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side) {
public int getWeakPower(final BlockState state, final BlockView w, final BlockPos pos, final Direction side) {
if (w instanceof World && this.getTileEntity(w, pos).isReady()) {
// FIXME: This is ... uhm... fishy
return ((World) w).getLight(pos) - 6;
@@ -91,14 +91,14 @@ public class LightDetectorBlock extends AEBaseTileBlock<LightDetectorTileEntity>
return this.canPlaceAt(w, pos, up.getOpposite());
}
private boolean canPlaceAt(final IBlockReader w, final BlockPos pos, final Direction dir) {
private boolean canPlaceAt(final BlockView w, final BlockPos pos, final Direction dir) {
final BlockPos test = pos.offset(dir);
BlockState blockstate = w.getBlockState(test);
return blockstate.isSolidSide(w, test, dir.getOpposite());
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
// FIXME: We should / rather MUST use state here because at startup, this gets
// called without a world
@@ -112,8 +112,8 @@ public class LightDetectorBlock extends AEBaseTileBlock<LightDetectorTileEntity>
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView worldIn, BlockPos pos,
ShapeContext context) {
return VoxelShapes.empty();
}
@@ -143,7 +143,7 @@ public class LightDetectorBlock extends AEBaseTileBlock<LightDetectorTileEntity>
}
@Override
public IOrientable getOrientable(final IBlockReader w, final BlockPos pos) {
public IOrientable getOrientable(final BlockView w, final BlockPos pos) {
return new MetaRotation(w, pos, BlockStateProperties.FACING);
}
@@ -27,20 +27,20 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.block.Material;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
@@ -81,7 +81,7 @@ public class QuartzFixtureBlock extends AEBaseBlock implements IOrientableBlock
public QuartzFixtureBlock() {
super(defaultProps(Material.MISCELLANEOUS).doesNotBlockMovement().hardnessAndResistance(0).lightValue(14)
.sound(SoundType.GLASS));
.sound(BlockSoundGroup.GLASS));
this.setDefaultState(getDefaultState().with(FACING, Direction.UP).with(ODD, false));
}
@@ -140,7 +140,7 @@ public class QuartzFixtureBlock extends AEBaseBlock implements IOrientableBlock
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
Direction facing = state.get(FACING);
return SHAPES.get(facing);
}
@@ -195,7 +195,7 @@ public class QuartzFixtureBlock extends AEBaseBlock implements IOrientableBlock
}
@Override
public IOrientable getOrientable(final IBlockReader w, final BlockPos pos) {
public IOrientable getOrientable(final BlockView w, final BlockPos pos) {
return new MetaRotation(w, pos, FACING);
}
@@ -22,12 +22,12 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.block.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
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.api.distmarker.Dist;
@@ -47,7 +47,7 @@ public class QuartzGrowthAcceleratorBlock extends AEBaseTileBlock<QuartzGrowthAc
private static final BooleanProperty POWERED = BooleanProperty.create("powered");
public QuartzGrowthAcceleratorBlock() {
super(defaultProps(Material.ROCK).sound(SoundType.METAL));
super(defaultProps(Material.ROCK).sound(BlockSoundGroup.METAL));
this.setDefaultState(this.getDefaultState().with(POWERED, false));
}
@@ -22,12 +22,12 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -61,22 +61,22 @@ public class SecurityStationBlock extends AEBaseTileBlock<SecurityStationTileEnt
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final SecurityStationTileEntity tg = this.getTileEntity(w, pos);
if (tg != null) {
if (w.isRemote()) {
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
ContainerOpener.openContainer(SecurityStationContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -21,13 +21,13 @@ package appeng.block.misc;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
@@ -37,7 +37,7 @@ import appeng.tile.misc.SkyCompassTileEntity;
public class SkyCompassBlock extends AEBaseTileBlock<SkyCompassTileEntity> {
public SkyCompassBlock(Block.Properties props) {
public SkyCompassBlock(Settings props) {
super(props);
}
@@ -50,7 +50,7 @@ public class SkyCompassBlock extends AEBaseTileBlock<SkyCompassTileEntity> {
return this.canPlaceAt(w, pos, forward.getOpposite());
}
private boolean canPlaceAt(final IBlockReader w, final BlockPos pos, final Direction dir) {
private boolean canPlaceAt(final BlockView w, final BlockPos pos, final Direction dir) {
final BlockPos test = pos.offset(dir);
BlockState blockstate = w.getBlockState(test);
return blockstate.isSolidSide(w, test, dir.getOpposite());
@@ -83,7 +83,7 @@ public class SkyCompassBlock extends AEBaseTileBlock<SkyCompassTileEntity> {
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
// TODO: This definitely needs to be memoized
@@ -145,8 +145,8 @@ public class SkyCompassBlock extends AEBaseTileBlock<SkyCompassTileEntity> {
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView worldIn, BlockPos pos,
ShapeContext context) {
return VoxelShapes.empty();
}
@@ -28,18 +28,18 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.AbstractArrowEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
@@ -51,23 +51,23 @@ public class TinyTNTBlock extends AEBaseBlock {
private static final VoxelShape SHAPE = VoxelShapes
.create(new AxisAlignedBB(0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f));
public TinyTNTBlock(Block.Properties props) {
public TinyTNTBlock(Settings props) {
super(props);
setFullSize(setOpaque(false));
}
@Override
public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos) {
public int getOpacity(BlockState state, BlockView worldIn, BlockPos pos) {
return 2; // FIXME: Validate that this is the correct value range
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
return SHAPE;
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (heldItem != null && heldItem.getItem() == Items.FLINT_AND_STEEL) {
this.startFuse(w, pos, player);
@@ -75,7 +75,7 @@ public class TinyTNTBlock extends AEBaseBlock {
heldItem.damageItem(1, player, p -> {
p.sendBreakAnimation(hand);
}); // FIXME Check if onBroken is equivalent
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
} else {
return super.onActivated(w, pos, player, hand, heldItem, hit);
}
@@ -24,14 +24,14 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -68,10 +68,10 @@ public final class VibrationChamberBlock extends AEBaseTileBlock<VibrationChambe
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (player.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
if (Platform.isServer()) {
@@ -79,11 +79,11 @@ public final class VibrationChamberBlock extends AEBaseTileBlock<VibrationChambe
if (tc != null && !player.isCrouching()) {
ContainerOpener.openContainer(VibrationChamberContainer.TYPE, player,
ContainerLocator.forTileEntitySide(tc, hit.getFace()));
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
@Override
@@ -40,16 +40,16 @@ import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.*;
import net.minecraft.util.math.RayTraceResult.Type;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
@@ -85,7 +85,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) {
public boolean propagatesSkylightDown(BlockState state, BlockView reader, BlockPos pos) {
return true;
}
@@ -100,7 +100,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public int getWeakPower(final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side) {
public int getWeakPower(final BlockState state, final BlockView w, final BlockPos pos, final Direction side) {
return this.cb(w, pos).isProvidingWeakPower(side.getOpposite()); // TODO:
// IS
// OPPOSITE!?
@@ -117,14 +117,14 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public int getStrongPower(final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side) {
public int getStrongPower(final BlockState state, final BlockView w, final BlockPos pos, final Direction side) {
return this.cb(w, pos).isProvidingStrongPower(side.getOpposite()); // TODO:
// IS
// OPPOSITE!?
}
@Override
public int getLightValue(final BlockState state, final IBlockReader world, final BlockPos pos) {
public int getLightValue(final BlockState state, final BlockView world, final BlockPos pos) {
if (state.getBlock() != this) {
return state.getBlock().getLightValue(state, world, pos);
}
@@ -156,7 +156,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public boolean canConnectRedstone(final BlockState state, final IBlockReader w, final BlockPos pos,
public boolean canConnectRedstone(final BlockState state, final BlockView w, final BlockPos pos,
Direction side) {
if (side == null) {
side = Direction.UP;
@@ -166,7 +166,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public ItemStack getPickBlock(BlockState state, RayTraceResult target, IBlockReader world, BlockPos pos,
public ItemStack getPickBlock(BlockState state, RayTraceResult target, BlockView world, BlockPos pos,
PlayerEntity player) {
final Vec3d v3 = target.getHitVec().subtract(pos.getX(), pos.getY(), pos.getZ());
final SelectedPart sp = this.cb(world, pos).selectPart(v3);
@@ -280,7 +280,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
}
private ICableBusContainer cb(final IBlockReader w, final BlockPos pos) {
private ICableBusContainer cb(final BlockView w, final BlockPos pos) {
final TileEntity te = w.getTileEntity(pos);
ICableBusContainer out = null;
@@ -292,7 +292,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Nullable
private IFacadeContainer fc(final IBlockReader w, final BlockPos pos) {
private IFacadeContainer fc(final BlockView w, final BlockPos pos) {
final TileEntity te = w.getTileEntity(pos);
IFacadeContainer out = null;
@@ -326,12 +326,12 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
// Transform from world into block space
Vec3d hitVec = hit.getHitVec();
Vec3d hitInBlock = new Vec3d(hitVec.x - pos.getX(), hitVec.y - pos.getY(), hitVec.z - pos.getZ());
return this.cb(w, pos).activate(player, hand, hitInBlock) ? ActionResultType.SUCCESS : ActionResultType.PASS;
return this.cb(w, pos).activate(player, hand, hitInBlock) ? ActionResult.SUCCESS : ActionResult.PASS;
}
@Override
@@ -339,7 +339,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
return recolorBlock(world, pos, side, color, null);
}
public boolean recolorBlock(final IBlockReader world, final BlockPos pos, final Direction side,
public boolean recolorBlock(final BlockView world, final BlockPos pos, final Direction side,
final DyeColor color, final PlayerEntity who) {
try {
return this.cb(world, pos).recolourBlock(side, AEColor.values()[color.ordinal()], who);
@@ -355,7 +355,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public BlockState getFacadeState(IBlockReader world, BlockPos pos, Direction side) {
public BlockState getFacadeState(BlockView world, BlockPos pos, Direction side) {
if (side != null) {
IFacadeContainer container = this.fc(world, pos);
if (container != null) {
@@ -369,7 +369,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
CableBusTileEntity te = getTileEntity(w, pos);
if (te == null) {
return VoxelShapes.empty();
@@ -379,7 +379,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
CableBusTileEntity te = getTileEntity(w, pos);
if (te == null) {
return VoxelShapes.empty();
@@ -20,10 +20,10 @@ package appeng.block.networking;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
@@ -18,7 +18,7 @@
package appeng.block.networking;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import appeng.block.AEBaseTileBlock;
import appeng.tile.networking.EnergyAcceptorTileEntity;
@@ -22,7 +22,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.state.IntegerProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.NonNullList;
@@ -47,7 +47,7 @@ public class EnergyCellBlock extends AEBaseTileBlock<EnergyCellTileEntity> {
super.fillItemGroup(group, itemStacks);
final ItemStack charged = new ItemStack(this, 1);
final CompoundNBT tag = charged.getOrCreateTag();
final CompoundTag tag = charged.getOrCreateTag();
tag.putDouble("internalCurrentPower", this.getMaxPower());
tag.putDouble("internalMaxPower", this.getMaxPower());
@@ -23,17 +23,17 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -84,7 +84,7 @@ public class WirelessBlock extends AEBaseTileBlock<WirelessTileEntity> {
}
@Override
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity player, Hand hand,
public ActionResult onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity player, Hand hand,
BlockRayTraceResult hit) {
final WirelessTileEntity tg = this.getTileEntity(w, pos);
@@ -93,14 +93,14 @@ public class WirelessBlock extends AEBaseTileBlock<WirelessTileEntity> {
ContainerOpener.openContainer(WirelessContainer.TYPE, player,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return super.onBlockActivated(state, w, pos, player, hand, hit);
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
final WirelessTileEntity tile = this.getTileEntity(w, pos);
if (tile != null) {
final Direction forward = tile.getForward();
@@ -159,7 +159,7 @@ public class WirelessBlock extends AEBaseTileBlock<WirelessTileEntity> {
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
final WirelessTileEntity tile = this.getTileEntity(w, pos);
if (tile != null) {
@@ -220,7 +220,7 @@ public class WirelessBlock extends AEBaseTileBlock<WirelessTileEntity> {
}
@Override
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) {
public boolean propagatesSkylightDown(BlockState state, BlockView reader, BlockPos pos) {
return true;
}
@@ -18,7 +18,7 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -20,18 +20,18 @@ package appeng.block.paint;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.fluid.Fluid;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -54,7 +54,7 @@ public class PaintSplotchesBlock extends AEBaseTileBlock<PaintSplotchesTileEntit
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
return VoxelShapes.empty();
}
@@ -76,7 +76,7 @@ public class PaintSplotchesBlock extends AEBaseTileBlock<PaintSplotchesTileEntit
}
@Override
public int getLightValue(final BlockState state, final IBlockReader w, final BlockPos pos) {
public int getLightValue(final BlockState state, final BlockView w, final BlockPos pos) {
final PaintSplotchesTileEntity tp = this.getTileEntity(w, pos);
if (tp != null) {
@@ -87,7 +87,7 @@ public class PaintSplotchesBlock extends AEBaseTileBlock<PaintSplotchesTileEntit
}
@Override
public boolean isAir(final BlockState state, final IBlockReader world, final BlockPos pos) {
public boolean isAir(final BlockState state, final BlockView world, final BlockPos pos) {
return true;
}
@@ -20,7 +20,7 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -3,7 +3,7 @@ package appeng.block.qnb;
import java.util.Set;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
public class QnbFormedState {
@@ -24,10 +24,10 @@ import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -44,14 +44,14 @@ public abstract class QuantumBaseBlock extends AEBaseTileBlock<QuantumBridgeTile
SHAPE = VoxelShapes.create(new AxisAlignedBB(shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave));
}
public QuantumBaseBlock(Block.Properties props) {
public QuantumBaseBlock(Settings props) {
super(props);
this.setFullSize(this.setOpaque(false));
this.setDefaultState(this.getDefaultState().with(FORMED, false));
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
return SHAPE;
}
@@ -25,15 +25,15 @@ import javax.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.client.EffectType;
@@ -73,10 +73,10 @@ public class QuantumLinkChamberBlock extends QuantumBaseBlock {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final QuantumBridgeTileEntity tg = this.getTileEntity(w, pos);
@@ -84,13 +84,13 @@ public class QuantumLinkChamberBlock extends QuantumBaseBlock {
if (Platform.isServer()) {
ContainerOpener.openContainer(QNBContainer.TYPE, p, ContainerLocator.forTileEntity(tg));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
return SHAPE;
}
@@ -19,13 +19,13 @@
package appeng.block.qnb;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import appeng.tile.qnb.QuantumBridgeTileEntity;
@@ -40,7 +40,7 @@ public class QuantumRingBlock extends QuantumBaseBlock {
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
final QuantumBridgeTileEntity bridge = this.getTileEntity(w, pos);
if (bridge != null && bridge.isCorner()) {
return SHAPE_CORNER;
@@ -20,19 +20,19 @@ package appeng.block.spatial;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@@ -65,13 +65,13 @@ public class MatrixFrameBlock extends AEBaseBlock {
}
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
ISelectionContext context) {
public VoxelShape getCollisionShape(BlockState state, BlockView worldIn, BlockPos pos,
ShapeContext context) {
return VoxelShapes.fullCube();
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
// This also prevents any blocks from being placed on this block!
return VoxelShapes.empty();
}
@@ -87,17 +87,17 @@ public class MatrixFrameBlock extends AEBaseBlock {
}
@Override
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) {
public boolean propagatesSkylightDown(BlockState state, BlockView reader, BlockPos pos) {
return true;
}
@Override
public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
public float getAmbientOcclusionLightValue(BlockState state, BlockView worldIn, BlockPos pos) {
return 1.0f;
}
@Override
public boolean canEntityDestroy(final BlockState state, final IBlockReader world, final BlockPos pos,
public boolean canEntityDestroy(final BlockState state, final BlockView world, final BlockPos pos,
final Entity entity) {
return false;
}
@@ -22,10 +22,10 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -54,10 +54,10 @@ public class SpatialIOPortBlock extends AEBaseTileBlock<SpatialIOPortTileEntity>
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final SpatialIOPortTileEntity tg = this.getTileEntity(w, pos);
@@ -66,8 +66,8 @@ public class SpatialIOPortBlock extends AEBaseTileBlock<SpatialIOPortTileEntity>
ContainerOpener.openContainer(SpatialIOPortContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -21,7 +21,7 @@ package appeng.block.spatial;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -44,7 +44,7 @@ public class SpatialPylonBlock extends AEBaseTileBlock<SpatialPylonTileEntity> {
}
@Override
public int getLightValue(final BlockState state, final IBlockReader w, final BlockPos pos) {
public int getLightValue(final BlockState state, final BlockView w, final BlockPos pos) {
final SpatialPylonTileEntity tsp = this.getTileEntity(w, pos);
if (tsp != null) {
return tsp.getLightValue();
@@ -22,12 +22,12 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -72,12 +72,12 @@ public class ChestBlock extends AEBaseTileBlock<ChestTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
final ChestTileEntity tg = this.getTileEntity(w, pos);
if (tg != null && !p.isCrouching()) {
if (w.isRemote()) {
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
if (hit.getFace() == tg.getUp()) {
@@ -89,9 +89,9 @@ public class ChestBlock extends AEBaseTileBlock<ChestTileEntity> {
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -20,10 +20,10 @@ package appeng.block.storage;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -43,10 +43,10 @@ public class DriveBlock extends AEBaseTileBlock<DriveTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final DriveTileEntity tg = this.getTileEntity(w, pos);
@@ -54,8 +54,8 @@ public class DriveBlock extends AEBaseTileBlock<DriveTileEntity> {
if (Platform.isServer()) {
ContainerOpener.openContainer(DriveContainer.TYPE, p, ContainerLocator.forTileEntity(tg));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -22,10 +22,10 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -54,10 +54,10 @@ public class IOPortBlock extends AEBaseTileBlock<IOPortTileEntity> {
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (p.isCrouching()) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
final IOPortTileEntity tg = this.getTileEntity(w, pos);
@@ -66,8 +66,8 @@ public class IOPortBlock extends AEBaseTileBlock<IOPortTileEntity> {
ContainerOpener.openContainer(IOPortContainer.TYPE, p,
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
return ActionResultType.PASS;
return ActionResult.PASS;
}
}
@@ -24,16 +24,16 @@ import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -66,33 +66,33 @@ public class SkyChestBlock extends AEBaseTileBlock<SkyChestTileEntity> {
}
@Override
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) {
public boolean propagatesSkylightDown(BlockState state, BlockView reader, BlockPos pos) {
return true;
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
if (Platform.isServer()) {
SkyChestTileEntity tile = getTileEntity(w, pos);
if (tile == null) {
return ActionResultType.PASS;
return ActionResult.PASS;
}
ContainerOpener.openContainer(SkyChestContainer.TYPE, player, ContainerLocator.forTileEntity(tile));
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
public VoxelShape getShape(BlockState state, BlockView worldIn, BlockPos pos, ShapeContext context) {
// TODO Cache this! It can't be that hard!
AxisAlignedBB aabb = computeAABB(worldIn, pos);
return VoxelShapes.create(aabb);
}
private AxisAlignedBB computeAABB(final IBlockReader w, final BlockPos pos) {
private AxisAlignedBB computeAABB(final BlockView w, final BlockPos pos) {
final SkyChestTileEntity sk = this.getTileEntity(w, pos);
Direction o = Direction.UP;
@@ -19,7 +19,7 @@
package appeng.capabilities;
import net.minecraft.nbt.INBT;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
@@ -35,7 +35,7 @@ import org.lwjgl.glfw.GLFW;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListNBT;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils;
@@ -205,7 +205,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
return super.keyPressed(keyCode, scanCode, p_keyPressed_3_);
}
public void postUpdate(final CompoundNBT in) {
public void postUpdate(final CompoundTag in) {
if (in.getBoolean("clear")) {
this.byId.clear();
this.refreshList = true;
@@ -216,7 +216,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
if (key.startsWith("=")) {
try {
final long id = Long.parseLong(key.substring(1), Character.MAX_RADIX);
final CompoundNBT invData = in.getCompound(key);
final CompoundTag invData = in.getCompound(key);
ITextComponent un = ITextComponent.Serializer.fromJson(invData.getString("un"));
final ClientDCInternalInv current = this.getById(id, invData.getLong("sortBy"), un);
@@ -307,7 +307,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
return false;
}
final CompoundNBT encodedValue = itemStack.getTag();
final CompoundTag encodedValue = itemStack.getTag();
if (encodedValue == null) {
return false;
@@ -31,7 +31,7 @@ import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
public abstract class DelegateBakedModel implements IBakedModel {
private final IBakedModel baseModel;
@@ -30,7 +30,7 @@ import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
/**
* @author DrummerMC
@@ -38,7 +38,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.LivingEntity;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ItemLayerModel;
@@ -30,7 +30,7 @@ import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.client.model.data.IModelData;
@@ -24,7 +24,7 @@ import net.minecraft.client.renderer.Matrix4f;
import net.minecraft.client.renderer.Quaternion;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.Vector4f;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.Vec3i;
@@ -27,7 +27,7 @@ import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.IWideReadableNumberConverter;
@@ -29,7 +29,7 @@ import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import appeng.api.util.AECableType;
@@ -38,7 +38,7 @@ import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.MissingTextureSprite;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.model.data.EmptyModelData;
@@ -25,7 +25,7 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Objects;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ILightReader;
@@ -30,7 +30,7 @@ import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
/**
@@ -23,7 +23,7 @@ import javax.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.fluid.IFluidState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ILightReader;
import net.minecraft.world.level.ColorResolver;
@@ -39,8 +39,8 @@ import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Direction.Axis;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
@@ -13,7 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -25,7 +25,7 @@ import net.minecraft.client.renderer.Matrix4f;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.client.render.FacingToRotation;
import appeng.thirdparty.codechicken.lib.model.CachedFormat;
@@ -31,7 +31,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -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 net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -20,7 +20,7 @@ package appeng.client.render.crafting;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IModelData;
import appeng.block.crafting.AbstractCraftingUnitBlock;
@@ -20,7 +20,7 @@ package appeng.client.render.crafting;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IModelData;
import appeng.api.util.AEColor;
@@ -20,7 +20,7 @@ package appeng.client.render.crafting;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IModelData;
import appeng.client.render.cablebus.CubeBuilder;
@@ -6,7 +6,7 @@ import javax.annotation.Nullable;
import com.google.common.base.Preconditions;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.client.model.data.ModelProperty;
@@ -40,7 +40,7 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.ILightReader;
@@ -19,7 +19,7 @@
package appeng.client.render.model;
import net.minecraft.block.BlockState;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
/**
* Used as the cache key for caching automatically rotated baked models.
@@ -21,7 +21,7 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraftforge.client.model.data.EmptyModelData;
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.PerspectiveMapWrapper;
import net.minecraftforge.client.model.data.EmptyModelData;
@@ -31,7 +31,7 @@ import net.minecraft.client.renderer.Matrix4f;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.item.Item;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
@@ -2,7 +2,7 @@ package appeng.client.render.model;
import java.util.Objects;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.block.storage.DriveSlotsState;
@@ -39,12 +39,12 @@ import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import net.minecraft.world.ILightReader;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -321,7 +321,7 @@ class GlassBakedModel implements IDynamicBakedModel {
}
private static boolean isGlassBlock(IBlockReader world, BlockPos pos, Direction facing) {
private static boolean isGlassBlock(BlockView world, BlockPos pos, Direction facing) {
return world.getBlockState(pos.offset(facing)).getBlock() instanceof QuartzGlassBlock;
}
@@ -25,7 +25,7 @@ import net.minecraft.client.renderer.Vector4f;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.pipeline.QuadGatheringTransformer;
/**
@@ -21,7 +21,7 @@ import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraftforge.client.model.data.EmptyModelData;
@@ -24,7 +24,7 @@ import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
// TODO: Investigate use of CubeBuilder instead
@@ -36,7 +36,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
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.client.model.data.IDynamicBakedModel;
@@ -54,7 +54,7 @@ import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.resources.IResourceManager;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelBuilder;
@@ -31,7 +31,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.inventory.container.PlayerContainer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.items.IItemHandler;
@@ -29,7 +29,7 @@ import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.model.IBakedModel;
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 net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.model.data.ModelDataMap;
@@ -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;
+3 -3
View File
@@ -20,8 +20,8 @@ package appeng.core.api;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -34,7 +34,7 @@ import appeng.parts.PartPlacement;
public class ApiPart implements IPartHelper {
@Override
public ActionResultType placeBus(final ItemStack is, final BlockPos pos, final Direction side,
public ActionResult placeBus(final ItemStack is, final BlockPos pos, final Direction side,
final PlayerEntity player, final Hand hand, final World w) {
return PartPlacement.place(is, pos, side, player, hand, w, PartPlacement.PlaceType.PLACE_ITEM, 0);
}
@@ -26,7 +26,7 @@ import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.MutableClassToInstanceMap;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidUtil;
@@ -92,7 +92,7 @@ public class ApiStorage implements IStorageHelper {
}
@Override
public ICraftingLink loadCraftingLink(final CompoundNBT data, final ICraftingRequester req) {
public ICraftingLink loadCraftingLink(final CompoundTag data, final ICraftingRequester req) {
Preconditions.checkNotNull(data);
Preconditions.checkNotNull(req);
@@ -140,7 +140,7 @@ public class ApiStorage implements IStorageHelper {
}
@Override
public IAEItemStack createFromNBT(CompoundNBT nbt) {
public IAEItemStack createFromNBT(CompoundTag nbt) {
Preconditions.checkNotNull(nbt);
return AEItemStack.fromNBT(nbt);
}
@@ -197,7 +197,7 @@ public class ApiStorage implements IStorageHelper {
}
@Override
public IAEFluidStack createFromNBT(CompoundNBT nbt) {
public IAEFluidStack createFromNBT(CompoundTag nbt) {
Preconditions.checkNotNull(nbt);
return AEFluidStack.fromNBT(nbt);
}
@@ -23,9 +23,9 @@ import static appeng.block.AEBaseBlock.defaultProps;
import net.minecraft.block.Block;
import net.minecraft.block.DispenserBlock;
import net.minecraft.block.SlabBlock;
import net.minecraft.block.SoundType;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.block.StairsBlock;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.entity.EntityClassification;
import net.minecraftforge.api.distmarker.Dist;
@@ -237,9 +237,9 @@ public final class ApiBlocks implements IBlocks {
private final IBlockDefinition cubeGenerator;
private final IBlockDefinition energyGenerator;
private static final Block.Properties QUARTZ_PROPERTIES = defaultProps(Material.ROCK).hardnessAndResistance(3, 5);
private static final AbstractBlock.Settings QUARTZ_PROPERTIES = defaultProps(Material.ROCK).hardnessAndResistance(3, 5);
private static final Block.Properties SKYSTONE_PROPERTIES = defaultProps(Material.ROCK).hardnessAndResistance(50,
private static final AbstractBlock.Settings SKYSTONE_PROPERTIES = defaultProps(Material.ROCK).hardnessAndResistance(50,
150);
public ApiBlocks(FeatureFactory registry) {
@@ -311,7 +311,7 @@ public final class ApiBlocks implements IBlocks {
.block("sky_stone_small_brick", () -> new SkyStoneBlock(SkystoneType.SMALL_BRICK, SKYSTONE_PROPERTIES))
.addFeatures(AEFeature.SKY_STONE).build();
Block.Properties skyStoneChestProps = defaultProps(Material.ROCK).hardnessAndResistance(50, 150).notSolid();
AbstractBlock.Settings skyStoneChestProps = defaultProps(Material.ROCK).hardnessAndResistance(50, 150).notSolid();
TileEntityDefinition skyChestTile = registry
.tileEntity("sky_chest", SkyChestTileEntity.class, SkyChestTileEntity::new)
@@ -383,7 +383,7 @@ public final class ApiBlocks implements IBlocks {
this.tinyTNT = registry
.block("tiny_tnt",
() -> new TinyTNTBlock(
defaultProps(Material.TNT).sound(SoundType.GROUND).hardnessAndResistance(0).notSolid()))
defaultProps(Material.TNT).sound(BlockSoundGroup.GROUND).hardnessAndResistance(0).notSolid()))
.features(AEFeature.TINY_TNT).bootstrap((block, item) -> (IInitComponent) () -> DispenserBlock
.registerDispenseBehavior(item, new TinyTNTDispenseItemBehavior()))
.build();
@@ -482,7 +482,7 @@ public final class ApiBlocks implements IBlocks {
.tileEntity("crafting_unit", CraftingTileEntity.class, CraftingTileEntity::new).build();
FeatureFactory crafting = registry.features(AEFeature.CRAFTING_CPU);
Block.Properties craftingBlockProps = defaultProps(Material.IRON);
AbstractBlock.Settings craftingBlockProps = defaultProps(Material.IRON);
this.craftingUnit = crafting
.block("crafting_unit", () -> new CraftingUnitBlock(craftingBlockProps, CraftingUnitType.UNIT))
.rendering(new CraftingCubeRendering()).tileEntity(craftingUnit).build();
@@ -26,7 +26,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import appeng.api.definitions.IBlockDefinition;
import appeng.api.features.AEFeature;
@@ -60,7 +60,7 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
}
@Override
public final boolean isSameAs(final IBlockReader world, final BlockPos pos) {
public final boolean isSameAs(final BlockView world, final BlockPos pos) {
return world.getBlockState(pos).getBlock() == this.block;
}
}
@@ -29,7 +29,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
@@ -24,7 +24,7 @@ import java.util.List;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
import appeng.api.AEApi;
import appeng.api.features.ILocatable;
@@ -71,7 +71,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry {
}
@Override
public void openWirelessTerminalGui(ItemStack item, IBlockReader world, PlayerEntity player, Hand hand) {
public void openWirelessTerminalGui(ItemStack item, BlockView world, PlayerEntity player, Hand hand) {
if (Platform.isClient()) {
return;
}
@@ -22,7 +22,7 @@ import io.netty.buffer.Unpooled;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.SoundType;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.SimpleSound;
import net.minecraft.entity.player.PlayerEntity;
@@ -140,7 +140,7 @@ public class BlockTransitionEffectPacket extends BasePacket {
volume = 1;
pitch = 1;
} else if (soundMode == SoundMode.BLOCK) {
SoundType soundType = blockState.getSoundType();
BlockSoundGroup soundType = blockState.getSoundType();
soundEvent = soundType.getBreakSound();
volume = soundType.volume;
pitch = soundType.pitch;
@@ -25,7 +25,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.PacketBuffer;
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.BlockRayTraceResult;
@@ -31,7 +31,7 @@ import io.netty.buffer.Unpooled;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.api.distmarker.Dist;
@@ -45,7 +45,7 @@ import appeng.core.sync.network.INetworkInfo;
public class CompressedNBTPacket extends BasePacket {
// input.
private final CompoundNBT in;
private final CompoundTag in;
// output...
private final PacketBuffer data;
private final GZIPOutputStream compressFrame;
@@ -72,7 +72,7 @@ public class CompressedNBTPacket extends BasePacket {
}
// api
public CompressedNBTPacket(final CompoundNBT din) throws IOException {
public CompressedNBTPacket(final CompoundTag din) throws IOException {
this.data = new PacketBuffer(Unpooled.buffer(2048));
this.data.writeInt(this.getPacketID());
@@ -25,7 +25,7 @@ import io.netty.buffer.Unpooled;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Container;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import appeng.api.storage.data.IAEFluidStack;
@@ -39,7 +39,7 @@ public class FluidSlotPacket extends BasePacket {
public FluidSlotPacket(final PacketBuffer stream) {
this.list = new HashMap<>();
CompoundNBT tag = stream.readCompoundTag();
CompoundTag tag = stream.readCompoundTag();
for (final String key : tag.keySet()) {
this.list.put(Integer.parseInt(key), AEFluidStack.fromNBT(tag.getCompound(key)));
@@ -49,9 +49,9 @@ public class FluidSlotPacket extends BasePacket {
// api
public FluidSlotPacket(final Map<Integer, IAEFluidStack> list) {
this.list = list;
final CompoundNBT sendTag = new CompoundNBT();
final CompoundTag sendTag = new CompoundTag();
for (Map.Entry<Integer, IAEFluidStack> fs : list.entrySet()) {
final CompoundNBT tag = new CompoundNBT();
final CompoundTag tag = new CompoundTag();
if (fs.getValue() != null) {
fs.getValue().writeToNBT(tag);
}
@@ -24,7 +24,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
@@ -57,7 +57,7 @@ public class JEIRecipePacket extends BasePacket {
private ItemStack[][] recipe;
public JEIRecipePacket(final PacketBuffer stream) {
final CompoundNBT comp = stream.readCompoundTag();
final CompoundTag comp = stream.readCompoundTag();
if (comp != null) {
this.recipe = new ItemStack[9][];
for (int x = 0; x < this.recipe.length; x++) {
@@ -73,7 +73,7 @@ public class JEIRecipePacket extends BasePacket {
}
// api
public JEIRecipePacket(final CompoundNBT recipe) {
public JEIRecipePacket(final CompoundTag recipe) {
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
data.writeInt(this.getPacketID());
@@ -23,7 +23,7 @@ import io.netty.buffer.Unpooled;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
@@ -20,7 +20,7 @@ package appeng.core.worlddata;
import java.util.Collection;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.dimension.Dimension;
/**
@@ -33,7 +33,7 @@ public interface IWorldSpawnData {
boolean hasGenerated(Dimension dim, int chunkX, int chunkZ);
boolean addNearByMeteorites(Dimension dim, int chunkX, int chunkZ, CompoundNBT newData);
boolean addNearByMeteorites(Dimension dim, int chunkX, int chunkZ, CompoundTag newData);
Collection<CompoundNBT> getNearByMeteorites(Dimension dim, int chunkX, int chunkZ);
Collection<CompoundTag> getNearByMeteorites(Dimension dim, int chunkX, int chunkZ);
}
@@ -29,7 +29,7 @@ import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.mojang.authlib.GameProfile;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.storage.WorldSavedData;
import appeng.core.AELog;
@@ -85,7 +85,7 @@ final class PlayerData extends WorldSavedData implements IWorldPlayerData {
}
@Override
public void read(CompoundNBT nbt) {
public void read(CompoundTag nbt) {
int[] playerIds = nbt.getIntArray(TAG_PLAYER_IDS);
long[] profileIds = nbt.getLongArray(TAG_PROFILE_IDS);
@@ -107,7 +107,7 @@ final class PlayerData extends WorldSavedData implements IWorldPlayerData {
}
@Override
public CompoundNBT write(CompoundNBT compound) {
public CompoundTag write(CompoundTag compound) {
int index = 0;
int[] playerIds = new int[mapping.size()];
long[] profileIds = new long[mapping.size() * 2];
@@ -23,7 +23,7 @@ import java.util.Map;
import javax.annotation.Nonnull;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.storage.WorldSavedData;
import appeng.core.AELog;
@@ -97,12 +97,12 @@ final class StorageData extends WorldSavedData implements IWorldGridStorageData
}
@Override
public void read(CompoundNBT tag) {
public void read(CompoundTag tag) {
nextGridId = tag.getLong(TAG_NEXT_ID);
// Load serialized grid storage
CompoundNBT storageTag = tag.getCompound(TAG_STORAGE);
CompoundTag storageTag = tag.getCompound(TAG_STORAGE);
for (String storageIdStr : storageTag.keySet()) {
long storageId;
try {
@@ -115,7 +115,7 @@ final class StorageData extends WorldSavedData implements IWorldGridStorageData
}
// Load ordered values map
CompoundNBT orderedValuesTag = tag.getCompound(TAG_ORDERED_VALUES);
CompoundTag orderedValuesTag = tag.getCompound(TAG_ORDERED_VALUES);
this.orderedValues.clear();
for (String key : orderedValuesTag.keySet()) {
this.orderedValues.put(key, orderedValuesTag.getInt(key));
@@ -124,12 +124,12 @@ final class StorageData extends WorldSavedData implements IWorldGridStorageData
}
@Override
public CompoundNBT write(CompoundNBT tag) {
public CompoundTag write(CompoundTag tag) {
tag.putLong(TAG_NEXT_ID, nextGridId);
// Save serialized grid storage
CompoundNBT storageTag = new CompoundNBT();
CompoundTag storageTag = new CompoundTag();
for (Map.Entry<Long, GridStorage> entry : storage.entrySet()) {
GridStorage gridStorage = entry.getValue();
@@ -148,7 +148,7 @@ final class StorageData extends WorldSavedData implements IWorldGridStorageData
tag.put(TAG_STORAGE, storageTag);
// Save ordered values
CompoundNBT orderedValuesTag = new CompoundNBT();
CompoundTag orderedValuesTag = new CompoundTag();
for (Map.Entry<String, Integer> entry : orderedValues.entrySet()) {
orderedValuesTag.putInt(entry.getKey(), entry.getValue());
}
@@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
import com.google.common.base.Stopwatch;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.World;
import appeng.api.AEApi;
@@ -104,7 +104,7 @@ public class CraftingJob implements Runnable, ICraftingJob {
return this.availableCheck.extractItems(available, Actionable.MODULATE, this.actionSrc);
}
public void writeToNBT(final CompoundNBT out) {
public void writeToNBT(final CompoundTag out) {
}
@@ -18,7 +18,7 @@
package appeng.crafting;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import appeng.api.config.Actionable;
import appeng.api.networking.crafting.ICraftingCPU;
@@ -36,7 +36,7 @@ public class CraftingLink implements ICraftingLink {
private boolean done = false;
private CraftingLinkNexus tie;
public CraftingLink(final CompoundNBT data, final ICraftingRequester req) {
public CraftingLink(final CompoundTag data, final ICraftingRequester req) {
this.CraftID = data.getString("CraftID");
this.setCanceled(data.getBoolean("canceled"));
this.setDone(data.getBoolean("done"));
@@ -50,7 +50,7 @@ public class CraftingLink implements ICraftingLink {
this.cpu = null;
}
public CraftingLink(final CompoundNBT data, final ICraftingCPU cpu) {
public CraftingLink(final CompoundTag data, final ICraftingCPU cpu) {
this.CraftID = data.getString("CraftID");
this.setCanceled(data.getBoolean("canceled"));
this.setDone(data.getBoolean("done"));
@@ -119,7 +119,7 @@ public class CraftingLink implements ICraftingLink {
}
@Override
public void writeToNBT(final CompoundNBT tag) {
public void writeToNBT(final CompoundTag tag) {
tag.putString("CraftID", this.CraftID);
tag.putBoolean("canceled", this.isCanceled());
tag.putBoolean("done", this.isDone());
@@ -18,7 +18,7 @@
package appeng.debug;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import appeng.block.AEBaseTileBlock;
@@ -20,10 +20,10 @@ package appeng.debug;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
@@ -38,14 +38,14 @@ public class CubeGeneratorBlock extends AEBaseTileBlock<CubeGeneratorTileEntity>
}
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
final CubeGeneratorTileEntity tcg = this.getTileEntity(w, pos);
if (tcg != null) {
tcg.click(player);
}
return ActionResultType.SUCCESS;
return ActionResult.SUCCESS;
}
}

Some files were not shown because too many files have changed in this diff Show More