mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 12:42:50 +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
@@ -10,6 +10,7 @@ package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.BlockRenderType;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@@ -34,7 +35,7 @@ import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlockCocoon extends BlockModWaterloggable {
|
||||
public class BlockCocoon extends BlockModWaterloggable implements ITileEntityProvider {
|
||||
|
||||
private static final VoxelShape SHAPE = makeCuboidShape(3, 0, 3, 13, 14, 13);;
|
||||
|
||||
@@ -107,14 +108,9 @@ public class BlockCocoon extends BlockModWaterloggable {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
@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 TileCocoon();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user