diff --git a/src/main/java/vazkii/botania/api/subtile/TileEntitySpecialFlower.java b/src/main/java/vazkii/botania/api/subtile/TileEntitySpecialFlower.java index edbad39ee..dc43b9713 100644 --- a/src/main/java/vazkii/botania/api/subtile/TileEntitySpecialFlower.java +++ b/src/main/java/vazkii/botania/api/subtile/TileEntitySpecialFlower.java @@ -236,30 +236,6 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile */ public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {} - /** - * Called when a player right clicks this sub tile. - */ - public ActionResultType onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { - return ActionResultType.PASS; - } - - /** - * Called when this sub tile is added to the world. - */ - public void onBlockAdded(World world, BlockPos pos, BlockState state) {} - - /** - * Called when this sub tile is harvested - */ - public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) {} - - /** - * Allows additional processing of sub tile drops - */ - public List getDrops(List list, LootContext.Builder ctx) { - return list; - } - /** * Gets the block coordinates this is bound to, for use with the wireframe render * when the sub tile is being hovered with a wand of the forest. @@ -302,20 +278,6 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile @OnlyIn(Dist.CLIENT) public void renderHUD(MatrixStack ms, Minecraft mc) {} - /** - * Gets the comparator input value for this SubTileEntity - */ - public int getComparatorInputOverride() { - return 0; - } - - /** - * Gets the redstone power level for this SubTileEntity - */ - public int getPowerLevel(Direction side) { - return 0; - } - /** * Gets if this SubTileEntity is affected by Enchanted Soil's speed boost. */ diff --git a/src/main/java/vazkii/botania/common/block/BlockFloatingSpecialFlower.java b/src/main/java/vazkii/botania/common/block/BlockFloatingSpecialFlower.java index ac78832f6..1382ef8ff 100644 --- a/src/main/java/vazkii/botania/common/block/BlockFloatingSpecialFlower.java +++ b/src/main/java/vazkii/botania/common/block/BlockFloatingSpecialFlower.java @@ -49,54 +49,10 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I this.teProvider = teProvider; } - @Override - public boolean hasComparatorInputOverride(BlockState state) { - return true; - } - - @Override - public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) { - return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getComparatorInputOverride(); - } - - @Override - public int getWeakPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) { - return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getPowerLevel(side); - } - - @Override - public int getStrongPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) { - return getWeakPower(state, world, pos, side); - } - - @Override - public boolean canProvidePower(BlockState state) { - return true; - } - @OnlyIn(Dist.CLIENT) @Override public void animateTick(BlockState state, World world, BlockPos pos, Random rand) {} - @Override - public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) { - super.onBlockHarvested(world, pos, state, player); - ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockHarvested(world, pos, state, player); - } - - @Nonnull - @Override - public List getDrops(@Nonnull BlockState state, @Nonnull LootContext.Builder builder) { - List drops = super.getDrops(state, builder); - TileEntity te = builder.get(LootParameters.BLOCK_ENTITY); - - if (te instanceof TileEntitySpecialFlower) { - return ((TileEntitySpecialFlower) te).getDrops(drops, builder); - } else { - return drops; - } - } - @Override public boolean onUsedByWand(PlayerEntity player, ItemStack stack, World world, BlockPos pos, Direction side) { return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onWanded(player, stack); @@ -107,21 +63,6 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack); } - @Override - public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { - ActionResultType tileResult = ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, hit); - if (tileResult.isSuccessOrConsume()) { - return tileResult; - } else { - return super.onBlockActivated(state, world, pos, player, hand, hit); - } - } - - @Override - public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { - ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockAdded(world, pos, state); - } - @OnlyIn(Dist.CLIENT) @Override public void renderHUD(MatrixStack ms, Minecraft mc, World world, BlockPos pos) { diff --git a/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java b/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java index 3332ad71c..4f49c7fe1 100644 --- a/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java +++ b/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java @@ -61,31 +61,6 @@ public class BlockSpecialFlower extends FlowerBlock implements ITileEntityProvid return SHAPE.withOffset(shift.x, shift.y, shift.z); } - @Override - public boolean hasComparatorInputOverride(BlockState state) { - return true; - } - - @Override - public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) { - return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getComparatorInputOverride(); - } - - @Override - public int getWeakPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) { - return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getPowerLevel(side); - } - - @Override - public int getStrongPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) { - return getWeakPower(state, world, pos, side); - } - - @Override - public boolean canProvidePower(BlockState state) { - return true; - } - @Override protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) { return state.getBlock() == ModBlocks.redStringRelay @@ -93,24 +68,6 @@ public class BlockSpecialFlower extends FlowerBlock implements ITileEntityProvid || super.isValidGround(state, worldIn, pos); } - @Override - public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) { - super.onBlockHarvested(world, pos, state, player); - ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockHarvested(world, pos, state, player); - } - - @Nonnull - @Override - public List getDrops(@Nonnull BlockState state, @Nonnull LootContext.Builder builder) { - List drops = super.getDrops(state, builder); - TileEntity te = builder.get(LootParameters.BLOCK_ENTITY); - if (te instanceof TileEntitySpecialFlower) { - return ((TileEntitySpecialFlower) te).getDrops(drops, builder); - } else { - return drops; - } - } - @Override public boolean eventReceived(BlockState state, World world, BlockPos pos, int event, int param) { super.eventReceived(state, world, pos, event, param); @@ -134,16 +91,6 @@ public class BlockSpecialFlower extends FlowerBlock implements ITileEntityProvid ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack); } - @Override - public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { - ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockAdded(world, pos, state); - } - - @Override - public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { - return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, hit); - } - @OnlyIn(Dist.CLIENT) @Override public void renderHUD(MatrixStack ms, Minecraft mc, World world, BlockPos pos) {