Compare commits

..

2 commits

Author SHA1 Message Date
Flanks255
56ec90df99 More fixes, time to sleep... 2021-08-29 19:01:35 -05:00
Flanks255
626df0f7fa Lots of little fixes, nothing to see here... 2021-08-29 18:38:12 -05:00
19 changed files with 71 additions and 105 deletions

View file

@ -27,7 +27,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock {
@Override
public Item.Properties getItemProperties() {
return new Item.Properties().group(ActuallyAdditions.GROUP);
return new Item.Properties().tab(ActuallyAdditions.GROUP);
}
public static class Stairs extends StairsBlock implements IActuallyBlock {
@ -42,7 +42,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock {
@Override
public Item.Properties getItemProperties() {
return new Item.Properties().group(ActuallyAdditions.GROUP);
return new Item.Properties().tab(ActuallyAdditions.GROUP);
}
}
@ -58,7 +58,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock {
@Override
public Item.Properties getItemProperties() {
return new Item.Properties().group(ActuallyAdditions.GROUP);
return new Item.Properties().tab(ActuallyAdditions.GROUP);
}
}
}

View file

@ -29,9 +29,9 @@ public final class ActuallyBlocks {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
public static final DeferredRegister<TileEntityType<?>> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, ActuallyAdditions.MODID);
private static final Item.Properties defaultBlockItemProperties = new Item.Properties().group(ActuallyAdditions.GROUP).maxStackSize(64);
private static final Item.Properties defaultBlockItemProperties = new Item.Properties().tab(ActuallyAdditions.GROUP).stacksTo(64);
public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.create(Material.ROCK).harvestLevel(1).harvestTool(ToolType.PICKAXE).hardnessAndResistance(1.5f, 10f);
public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.of(Material.STONE).harvestLevel(1).harvestTool(ToolType.PICKAXE).strength(1.5f, 10f);
// Casings
public static final AABlockReg<ActuallyBlock, AABlockItem, ?> WOOD_CASING = new AABlockReg<>("wood_casing", () -> new ActuallyBlock(miscBlockProperties), ActuallyBlock::createBlockItem);
@ -217,37 +217,37 @@ public final class ActuallyBlocks {
public static final AABlockReg<ActuallyBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_BLOCK = new AABlockReg<>("chiseled_black_quartz_block", () -> new ActuallyBlock(miscBlockProperties),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<StairsBlock, AABlockItem, ?> ETHETIC_GREEN_STAIRS = new AABlockReg<>("ethetic_green_stairs", () -> new StairsBlock(() -> ETHETIC_GREEN_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get())),
public static final AABlockReg<StairsBlock, AABlockItem, ?> ETHETIC_GREEN_STAIRS = new AABlockReg<>("ethetic_green_stairs", () -> new StairsBlock(() -> ETHETIC_GREEN_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<StairsBlock, AABlockItem, ?> ETHETIC_WHITE_STAIRS = new AABlockReg<>("ethetic_white_stairs", () -> new StairsBlock(() -> ETHETIC_WHITE_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get())),
public static final AABlockReg<StairsBlock, AABlockItem, ?> ETHETIC_WHITE_STAIRS = new AABlockReg<>("ethetic_white_stairs", () -> new StairsBlock(() -> ETHETIC_WHITE_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<StairsBlock, AABlockItem, ?> BLACK_QUARTZ_STAIR = new AABlockReg<>("black_quartz_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<StairsBlock, AABlockItem, ?> BLACK_QUARTZ_STAIR = new AABlockReg<>("black_quartz_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<StairsBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_STAIR = new AABlockReg<>("chiseled_black_quartz_stair", () -> new StairsBlock(() -> CHISELED_BLACK_QUARTZ_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(CHISELED_BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<StairsBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_STAIR = new AABlockReg<>("chiseled_black_quartz_stair", () -> new StairsBlock(() -> CHISELED_BLACK_QUARTZ_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<StairsBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_STAIR = new AABlockReg<>("black_quartz_pillar_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_PILLAR_BLOCK.get().getDefaultState(), AbstractBlock.Properties.from(BLACK_QUARTZ_PILLAR_BLOCK.get())),
public static final AABlockReg<StairsBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_STAIR = new AABlockReg<>("black_quartz_pillar_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_PILLAR_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<WallBlock, AABlockItem, ?> ETHETIC_GREEN_WALL = new AABlockReg<>("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get())),
public static final AABlockReg<WallBlock, AABlockItem, ?> ETHETIC_GREEN_WALL = new AABlockReg<>("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<WallBlock, AABlockItem, ?> ETHETIC_WHITE_WALL = new AABlockReg<>("ethetic_white_wall", () -> new WallBlock(AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get())),
public static final AABlockReg<WallBlock, AABlockItem, ?> ETHETIC_WHITE_WALL = new AABlockReg<>("ethetic_white_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<WallBlock, AABlockItem, ?> BLACK_QUARTZ_WALL = new AABlockReg<>("black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<WallBlock, AABlockItem, ?> BLACK_QUARTZ_WALL = new AABlockReg<>("black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<WallBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_WALL = new AABlockReg<>("chiseled_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(CHISELED_BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<WallBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_WALL = new AABlockReg<>("chiseled_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<WallBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_WALL = new AABlockReg<>("black_quartz_pillar_wall", () -> new WallBlock(AbstractBlock.Properties.from(BLACK_QUARTZ_PILLAR_BLOCK.get())),
public static final AABlockReg<WallBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_WALL = new AABlockReg<>("black_quartz_pillar_wall", () -> new WallBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<SlabBlock, AABlockItem, ?> ETHETIC_GREEN_SLAB = new AABlockReg<>("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.from(ETHETIC_GREEN_BLOCK.get())),
public static final AABlockReg<SlabBlock, AABlockItem, ?> ETHETIC_GREEN_SLAB = new AABlockReg<>("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<SlabBlock, AABlockItem, ?> ETHETIC_WHITE_SLAB = new AABlockReg<>("ethetic_white_slab", () -> new SlabBlock(AbstractBlock.Properties.from(ETHETIC_WHITE_BLOCK.get())),
public static final AABlockReg<SlabBlock, AABlockItem, ?> ETHETIC_WHITE_SLAB = new AABlockReg<>("ethetic_white_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<SlabBlock, AABlockItem, ?> BLACK_QUARTZ_SLAB = new AABlockReg<>("black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<SlabBlock, AABlockItem, ?> BLACK_QUARTZ_SLAB = new AABlockReg<>("black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<SlabBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_SLAB = new AABlockReg<>("chiseled_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(CHISELED_BLACK_QUARTZ_BLOCK.get())),
public static final AABlockReg<SlabBlock, AABlockItem, ?> CHISELED_BLACK_QUARTZ_SLAB = new AABlockReg<>("chiseled_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));
public static final AABlockReg<SlabBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_SLAB = new AABlockReg<>("black_quartz_pillar_slab", () -> new SlabBlock(AbstractBlock.Properties.from(BLACK_QUARTZ_PILLAR_BLOCK.get())),
public static final AABlockReg<SlabBlock, AABlockItem, ?> BLACK_QUARTZ_PILLAR_SLAB = new AABlockReg<>("black_quartz_pillar_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR_BLOCK.get())),
(b) -> new AABlockItem(b, defaultBlockItemProperties));

View file

@ -24,7 +24,7 @@ public class BlockCrystal extends ActuallyBlock {
public AABlockItem createBlockItem() {
return new AABlockItem(this, getItemProperties()) {
@Override
public boolean hasEffect(ItemStack stack) {
public boolean isFoil(ItemStack stack) {
return isEmpowered;
}
};

View file

@ -1,39 +0,0 @@
// TODO: [port][note] not used
///*
// * This file ("BlockFurnaceSolar.java") is part of the Actually Additions mod for Minecraft.
// * It is created and owned by Ellpeck and distributed
// * under the Actually Additions License to be found at
// * http://ellpeck.de/actaddlicense
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
// *
// * © 2015-2017 Ellpeck
// */
//
//package de.ellpeck.actuallyadditions.mod.blocks;
//
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
//import net.minecraft.block.BlockState;
//import net.minecraft.block.SoundType;
//import net.minecraft.block.material.Material;
//import net.minecraft.tileentity.TileEntity;
//import net.minecraft.util.math.AxisAlignedBB;
//import net.minecraft.util.math.BlockPos;
//import net.minecraft.world.IBlockAccess;
//import net.minecraft.world.IBlockReader;
//
//public class BlockFurnaceSolar extends BlockContainerBase {
// public BlockFurnaceSolar() {
// super(Material.ROCK, this.name);
// this.setHarvestLevel("pickaxe", 0);
// this.setHardness(1.5F);
// this.setResistance(10.0F);
// this.setSoundType(SoundType.STONE);
// }
//
//
// @Override
// public TileEntity createNewTileEntity(IBlockReader worldIn) {
// return new TileEntityFurnaceSolar();
// }
//}

View file

@ -19,13 +19,15 @@ import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import javax.annotation.Nullable;
public class BlockItemInterface extends BlockContainerBase {
public BlockItemInterface() {
super(ActuallyBlocks.defaultPickProps(0));
}
@Override
public TileEntity createNewTileEntity(IBlockReader worldIn) {
public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityItemInterface();
}

View file

@ -29,7 +29,7 @@ public class BlockItemInterfaceHopping extends BlockItemInterface {
}
@Override
public TileEntity createNewTileEntity(IBlockReader worldIn) {
public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityItemInterfaceHopping();
}
}

View file

@ -31,12 +31,12 @@ public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container {
}
@Override
public TileEntity createNewTileEntity(IBlockReader worldIn) {
public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityLongRangeBreaker();
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.PASS;
}
@ -46,7 +46,7 @@ public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container {
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(FACING)) {
switch (state.getValue(FACING)) {
case UP:
return Shapes.DirectionalBlockBreakerShapes.SHAPE_U;
case DOWN:

View file

@ -38,21 +38,21 @@ import java.util.Random;
public class BlockPoweredFurnace extends BlockContainerBase {
public BlockPoweredFurnace() {
// TODO: [port] confirm this is correct for light level... Might not be reactive.
super(ActuallyBlocks.defaultPickProps(0).tickRandomly().setLightLevel(state -> state.get(LIT)
super(ActuallyBlocks.defaultPickProps(0).randomTicks().lightLevel(state -> state.getValue(LIT)
? 12
: 0));
this.setDefaultState(this.stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(LIT, false));
registerDefaultState(getStateDefinition().any().setValue(HORIZONTAL_FACING, Direction.NORTH).setValue(LIT, false));
}
@Override
public TileEntity createNewTileEntity(IBlockReader worldIn) {
public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityPoweredFurnace();
}
@Override
public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
if (state.get(LIT)) {
if (state.getValue(LIT)) {
for (int i = 0; i < 5; i++) {
worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D);
}
@ -60,17 +60,17 @@ public class BlockPoweredFurnace extends BlockContainerBase {
}
@Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
return this.openGui(worldIn, player, pos, TileEntityPoweredFurnace.class);
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).with(LIT, false);
return defaultBlockState().setValue(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).setValue(LIT, false);
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
builder.add(LIT).add(HORIZONTAL_FACING);
}
@ -91,7 +91,7 @@ public class BlockPoweredFurnace extends BlockContainerBase {
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
switch (state.get(HORIZONTAL_FACING)) {
switch (state.getValue(HORIZONTAL_FACING)) {
case EAST:
return Shapes.FurnaceDoubleShapes.SHAPE_E;
case SOUTH:

View file

@ -33,33 +33,29 @@ public class CrystalClusterBlock extends FullyDirectionalBlock {
public static final DirectionProperty FACING = BlockStateProperties.FACING;
public static final VoxelShape CRYSTAL_SHAPE = Stream.of(
Block.makeCuboidShape(5, 4, 5, 10, 19, 10), Block.makeCuboidShape(4, 0, 4, 11, 5, 11),
Block.makeCuboidShape(3, 0, 3, 5, 4, 5), Block.makeCuboidShape(10, 0, 3, 12, 2, 5),
Block.makeCuboidShape(12, 0, 4, 13, 1, 5), Block.makeCuboidShape(11, 0, 5, 12, 1, 6),
Block.makeCuboidShape(10, 0, 10, 12, 3, 12), Block.makeCuboidShape(3, 0, 10, 5, 1, 12),
Block.makeCuboidShape(9, 0, 3, 10, 3, 4), Block.makeCuboidShape(8, 0, 2, 11, 1, 4),
Block.makeCuboidShape(4, 0, 2, 5, 2, 3), Block.makeCuboidShape(5, 0, 3, 7, 1, 4),
Block.makeCuboidShape(2, 0, 4, 4, 1, 6), Block.makeCuboidShape(3, 0, 5, 4, 3, 6.5),
Block.makeCuboidShape(3, 0, 9, 4, 2, 10), Block.makeCuboidShape(2, 0, 8, 4, 1, 10),
Block.makeCuboidShape(5, 0, 11, 7, 2, 13), Block.makeCuboidShape(7, 0, 11, 11, 1, 13),
Block.makeCuboidShape(10, 0, 9, 13, 1, 11), Block.makeCuboidShape(11, 0, 7, 12, 3, 9)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();
Block.box(5, 4, 5, 10, 19, 10), Block.box(4, 0, 4, 11, 5, 11),
Block.box(3, 0, 3, 5, 4, 5), Block.box(10, 0, 3, 12, 2, 5),
Block.box(12, 0, 4, 13, 1, 5), Block.box(11, 0, 5, 12, 1, 6),
Block.box(10, 0, 10, 12, 3, 12), Block.box(3, 0, 10, 5, 1, 12),
Block.box(9, 0, 3, 10, 3, 4), Block.box(8, 0, 2, 11, 1, 4),
Block.box(4, 0, 2, 5, 2, 3), Block.box(5, 0, 3, 7, 1, 4),
Block.box(2, 0, 4, 4, 1, 6), Block.box(3, 0, 5, 4, 3, 6.5),
Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10),
Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13),
Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9)
).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR) ).get();
public CrystalClusterBlock(Crystals crystal) {
super(Properties.create(Material.GLASS)
.setLightLevel((e) -> 7)
super(Block.Properties.of(Material.GLASS)
.lightLevel((e) -> 7)
.sound(SoundType.GLASS)
.hardnessAndResistance(0.25f, 1.0f));
.noOcclusion()
.strength(0.25f, 1.0f));
}
@Override
public BlockState getBaseConstructorState() {
return this.stateContainer.getBaseState().with(FACING, Direction.UP);
}
@Override
public boolean isTransparent(BlockState state) {
return true;
return this.defaultBlockState().setValue(FACING, Direction.UP);
}
@Override

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerBreaker;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
@ -46,7 +47,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements INamed
}
public TileEntityBreaker() {
super(ActuallyTiles.BREAKER_TILE.get(), 9);
super(ActuallyBlocks.BREAKER.getTileEntityType(), 9);
this.isPlacer = false;
}

View file

@ -10,9 +10,11 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
public class TileEntityPhantomBooster extends TileEntityBase {
public TileEntityPhantomBooster() {
super(ActuallyTiles.PHANTOM_BOOSTER_TILE.get());
super(ActuallyBlocks.PHANTOM_BOOSTER.getTileEntityType());
}
}

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover;
@ -17,7 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover;
public class TileEntityPhantomBreaker extends TileEntityPhantomPlacer {
public TileEntityPhantomBreaker() {
super(ActuallyTiles.PHANTOMBREAKER_TILE.get(), 9);
super(ActuallyBlocks.PHANTOM_BREAKER.getTileEntityType(), 9);
this.isBreaker = true;
}

View file

@ -17,7 +17,7 @@ import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
public class TileEntityPhantomEnergyface extends TileEntityPhantomFace implements ISharingEnergyProvider {
public class TileEntityPhantomEnergyface extends TileEntityPhantomface implements ISharingEnergyProvider {
public TileEntityPhantomEnergyface() {
super(ActuallyBlocks.PHANTOM_ENERGYFACE.getTileEntityType());

View file

@ -19,7 +19,7 @@ import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
public class TileEntityPhantomItemface extends TileEntityPhantomFace {
public class TileEntityPhantomItemface extends TileEntityPhantomface {
public TileEntityPhantomItemface() {
super(ActuallyBlocks.PHANTOM_ITEMFACE.getTileEntityType());

View file

@ -17,7 +17,7 @@ import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
public class TileEntityPhantomLiquiface extends TileEntityPhantomFace implements ISharingFluidHandler {
public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements ISharingFluidHandler {
public TileEntityPhantomLiquiface() {
super(ActuallyBlocks.PHANTOM_LIQUIFACE.getTileEntityType());

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.Direction;
@ -17,7 +18,7 @@ import net.minecraftforge.common.capabilities.Capability;
import java.util.Arrays;
public class TileEntityPhantomRedstoneface extends TileEntityPhantomFace {
public class TileEntityPhantomRedstoneface extends TileEntityPhantomface {
public final int[] providesStrong = new int[Direction.values().length];
public final int[] providesWeak = new int[Direction.values().length];
@ -26,7 +27,7 @@ public class TileEntityPhantomRedstoneface extends TileEntityPhantomFace {
private final int[] lastProvidesWeak = new int[this.providesWeak.length];
public TileEntityPhantomRedstoneface() {
super(ActuallyTiles.PHANTOMREDSTONEFACE_TILE.get());
super(ActuallyBlocks.PHANTOM_REDSTONEFACE.getTileEntityType());
}
@Override

View file

@ -33,7 +33,6 @@ import javax.annotation.Nullable;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType;
public abstract class TileEntityPhantomface extends TileEntityInventoryBase implements IPhantomTile {
public static final int RANGE = 16;
public BlockPos boundPosition;
public BlockPhantom.Type type;
@ -43,10 +42,11 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl
private Block boundBlockBefore;
private int lastStrength;
public TileEntityPhantomFace(TileEntityType<?> type) {
public TileEntityPhantomface(TileEntityType<?> type) {
super(type, 0);
}
public static int upgradeRange(int defaultRange, World world, BlockPos pos) {
int newRange = defaultRange;
for (int i = 0; i < 3; i++) {

View file

@ -10,13 +10,14 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
public class TileEntityPlacer extends TileEntityBreaker {
public TileEntityPlacer() {
super(ActuallyTiles.PLACER_TILE.get(), 9);
super(ActuallyBlocks.PLACER.getTileEntityType(), 9);
this.isPlacer = true;
}

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
@ -38,7 +39,7 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy
private int range;
public TileEntityPlayerInterface() {
super(ActuallyTiles.PLAYERINTERFACE_TILE.get());
super(ActuallyBlocks.PLAYER_INTERFACE.getTileEntityType());
}
private PlayerEntity getPlayer() {