Tile -> BlockEntity + some more refactors
This commit is contained in:
parent
7f8674f1ca
commit
dbc89adaf7
193 changed files with 3194 additions and 3214 deletions
|
@ -44,14 +44,14 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.ToolManager;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import reborncore.common.BaseBlockEntityProvider;
|
||||
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||
import reborncore.common.util.WrenchUtils;
|
||||
import techreborn.tiles.lighting.TileLamp;
|
||||
import techreborn.blockentity.lighting.LampBlockEntity;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockLamp extends BaseTileBlock {
|
||||
public class BlockLamp extends BaseBlockEntityProvider {
|
||||
|
||||
public static DirectionProperty FACING = Properties.FACING;
|
||||
public static BooleanProperty ACTIVE;
|
||||
|
@ -107,7 +107,7 @@ public class BlockLamp extends BaseTileBlock {
|
|||
// BaseTileBlock
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView worldIn) {
|
||||
return new TileLamp();
|
||||
return new LampBlockEntity();
|
||||
}
|
||||
|
||||
// Block
|
||||
|
@ -142,10 +142,10 @@ public class BlockLamp extends BaseTileBlock {
|
|||
@Override
|
||||
public boolean activate(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult hitResult) {
|
||||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
BlockEntity tileEntity = worldIn.getBlockEntity(pos);
|
||||
BlockEntity blockEntity = worldIn.getBlockEntity(pos);
|
||||
|
||||
// We extended BaseTileBlock. Thus we should always have tile entity. I hope.
|
||||
if (tileEntity == null) {
|
||||
// We extended BaseTileBlock. Thus we should always have blockEntity entity. I hope.
|
||||
if (blockEntity == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue