mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Convert forge has/createTileEntity back into ITEP for portability.Once upon a time this was 'best practice' but it never seemed to provide any benefit.
This commit is contained in:
1 parent
7c77a31347
commit
75a4dd16cc
55 files changed
+140
-317
No files matched your search
@@ -11,6 +11,7 @@ package vazkii.botania.common.block;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockRenderType;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.state.StateContainer;
|
||||
@@ -36,7 +37,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockLightRelay extends BlockModWaterloggable implements IWandable {
|
||||
public class BlockLightRelay extends BlockModWaterloggable implements ITileEntityProvider, IWandable {
|
||||
|
||||
private static final VoxelShape SHAPE = makeCuboidShape(5, 5, 5, 11, 11, 11);
|
||||
public final LuminizerVariant variant;
|
||||
@@ -103,14 +104,9 @@ public class BlockLightRelay extends BlockModWaterloggable implements IWandable
|
||||
return BlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TileEntity createTileEntity(@Nonnull BlockState state, @Nonnull IBlockReader world) {
|
||||
public TileEntity createNewTileEntity(@Nonnull IBlockReader world) {
|
||||
return new TileLightRelay();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user