diff options
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/level/block/BigDripleafBlock.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower/net/minecraft/world/level/block/BigDripleafBlock.java.patch | 403 |
1 files changed, 403 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/level/block/BigDripleafBlock.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/level/block/BigDripleafBlock.java.patch new file mode 100644 index 0000000000..6b52b181e1 --- /dev/null +++ b/patch-remap/mache-vineflower/net/minecraft/world/level/block/BigDripleafBlock.java.patch @@ -0,0 +1,403 @@ +--- a/net/minecraft/world/level/block/BigDripleafBlock.java ++++ b/net/minecraft/world/level/block/BigDripleafBlock.java +@@ -17,6 +17,7 @@ + import net.minecraft.util.Mth; + import net.minecraft.util.RandomSource; + import net.minecraft.world.entity.Entity; ++import net.minecraft.world.entity.player.Player; + import net.minecraft.world.entity.projectile.Projectile; + import net.minecraft.world.item.context.BlockPlaceContext; + import net.minecraft.world.level.BlockGetter; +@@ -25,13 +26,14 @@ + import net.minecraft.world.level.LevelHeightAccessor; + import net.minecraft.world.level.LevelReader; + import net.minecraft.world.level.block.state.BlockBehaviour; +-import net.minecraft.world.level.block.state.BlockState; ++import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.block.state.StateDefinition; + import net.minecraft.world.level.block.state.properties.BlockStateProperties; + import net.minecraft.world.level.block.state.properties.BooleanProperty; + import net.minecraft.world.level.block.state.properties.EnumProperty; + import net.minecraft.world.level.block.state.properties.Tilt; + import net.minecraft.world.level.gameevent.GameEvent; ++import net.minecraft.world.level.material.Fluid; + import net.minecraft.world.level.material.FluidState; + import net.minecraft.world.level.material.Fluids; + import net.minecraft.world.phys.BlockHitResult; +@@ -39,243 +41,262 @@ + import net.minecraft.world.phys.shapes.CollisionContext; + import net.minecraft.world.phys.shapes.Shapes; + import net.minecraft.world.phys.shapes.VoxelShape; ++// CraftBukkit start ++import org.bukkit.craftbukkit.event.CraftEventFactory; ++import org.bukkit.event.entity.EntityInteractEvent; ++// CraftBukkit end + + public class BigDripleafBlock extends HorizontalDirectionalBlock implements BonemealableBlock, SimpleWaterloggedBlock { ++ + public static final MapCodec<BigDripleafBlock> CODEC = simpleCodec(BigDripleafBlock::new); + private static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + private static final EnumProperty<Tilt> TILT = BlockStateProperties.TILT; + private static final int NO_TICK = -1; +- private static final Object2IntMap<Tilt> DELAY_UNTIL_NEXT_TILT_STATE = Util.make(new Object2IntArrayMap<>(), map -> { +- map.defaultReturnValue(-1); +- map.put(Tilt.UNSTABLE, 10); +- map.put(Tilt.PARTIAL, 10); +- map.put(Tilt.FULL, 100); ++ private static final Object2IntMap<Tilt> DELAY_UNTIL_NEXT_TILT_STATE = (Object2IntMap) Util.make(new Object2IntArrayMap(), (object2intarraymap) -> { ++ object2intarraymap.defaultReturnValue(-1); ++ object2intarraymap.put(Tilt.UNSTABLE, 10); ++ object2intarraymap.put(Tilt.PARTIAL, 10); ++ object2intarraymap.put(Tilt.FULL, 100); + }); + private static final int MAX_GEN_HEIGHT = 5; + private static final int STEM_WIDTH = 6; + private static final int ENTITY_DETECTION_MIN_Y = 11; + private static final int LOWEST_LEAF_TOP = 13; +- private static final Map<Tilt, VoxelShape> LEAF_SHAPES = ImmutableMap.of( +- Tilt.NONE, +- Block.box(0.0, 11.0, 0.0, 16.0, 15.0, 16.0), +- Tilt.UNSTABLE, +- Block.box(0.0, 11.0, 0.0, 16.0, 15.0, 16.0), +- Tilt.PARTIAL, +- Block.box(0.0, 11.0, 0.0, 16.0, 13.0, 16.0), +- Tilt.FULL, +- Shapes.empty() +- ); +- private static final VoxelShape STEM_SLICER = Block.box(0.0, 13.0, 0.0, 16.0, 16.0, 16.0); +- private static final Map<Direction, VoxelShape> STEM_SHAPES = ImmutableMap.of( +- Direction.NORTH, +- Shapes.joinUnoptimized(BigDripleafStemBlock.NORTH_SHAPE, STEM_SLICER, BooleanOp.ONLY_FIRST), +- Direction.SOUTH, +- Shapes.joinUnoptimized(BigDripleafStemBlock.SOUTH_SHAPE, STEM_SLICER, BooleanOp.ONLY_FIRST), +- Direction.EAST, +- Shapes.joinUnoptimized(BigDripleafStemBlock.EAST_SHAPE, STEM_SLICER, BooleanOp.ONLY_FIRST), +- Direction.WEST, +- Shapes.joinUnoptimized(BigDripleafStemBlock.WEST_SHAPE, STEM_SLICER, BooleanOp.ONLY_FIRST) +- ); +- private final Map<BlockState, VoxelShape> shapesCache; ++ private static final Map<Tilt, VoxelShape> LEAF_SHAPES = ImmutableMap.of(Tilt.NONE, Block.box(0.0D, 11.0D, 0.0D, 16.0D, 15.0D, 16.0D), Tilt.UNSTABLE, Block.box(0.0D, 11.0D, 0.0D, 16.0D, 15.0D, 16.0D), Tilt.PARTIAL, Block.box(0.0D, 11.0D, 0.0D, 16.0D, 13.0D, 16.0D), Tilt.FULL, Shapes.empty()); ++ private static final VoxelShape STEM_SLICER = Block.box(0.0D, 13.0D, 0.0D, 16.0D, 16.0D, 16.0D); ++ private static final Map<Direction, VoxelShape> STEM_SHAPES = ImmutableMap.of(Direction.NORTH, Shapes.joinUnoptimized(BigDripleafStemBlock.NORTH_SHAPE, BigDripleafBlock.STEM_SLICER, BooleanOp.ONLY_FIRST), Direction.SOUTH, Shapes.joinUnoptimized(BigDripleafStemBlock.SOUTH_SHAPE, BigDripleafBlock.STEM_SLICER, BooleanOp.ONLY_FIRST), Direction.EAST, Shapes.joinUnoptimized(BigDripleafStemBlock.EAST_SHAPE, BigDripleafBlock.STEM_SLICER, BooleanOp.ONLY_FIRST), Direction.WEST, Shapes.joinUnoptimized(BigDripleafStemBlock.WEST_SHAPE, BigDripleafBlock.STEM_SLICER, BooleanOp.ONLY_FIRST)); ++ private final Map<IBlockData, VoxelShape> shapesCache; + + @Override + public MapCodec<BigDripleafBlock> codec() { +- return CODEC; ++ return BigDripleafBlock.CODEC; + } + + protected BigDripleafBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState( +- this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH).setValue(TILT, Tilt.NONE) +- ); ++ this.registerDefaultState((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.stateDefinition.any()).setValue(BigDripleafBlock.WATERLOGGED, false)).setValue(BigDripleafBlock.FACING, Direction.NORTH)).setValue(BigDripleafBlock.TILT, Tilt.NONE)); + this.shapesCache = this.getShapeForEachState(BigDripleafBlock::calculateShape); + } + +- private static VoxelShape calculateShape(BlockState state) { +- return Shapes.or(LEAF_SHAPES.get(state.getValue(TILT)), STEM_SHAPES.get(state.getValue(FACING))); ++ private static VoxelShape calculateShape(IBlockData state) { ++ return Shapes.or((VoxelShape) BigDripleafBlock.LEAF_SHAPES.get(state.getValue(BigDripleafBlock.TILT)), (VoxelShape) BigDripleafBlock.STEM_SHAPES.get(state.getValue(BigDripleafBlock.FACING))); + } + + public static void placeWithRandomHeight(LevelAccessor level, RandomSource random, BlockPos pos, Direction direction) { +- int randomInt = Mth.nextInt(random, 2, 5); +- BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); +- int i = 0; ++ int i = Mth.nextInt(random, 2, 5); ++ BlockPos.MutableBlockPos blockposition_mutableblockposition = pos.mutable(); ++ int j = 0; + +- while (i < randomInt && canPlaceAt(level, mutableBlockPos, level.getBlockState(mutableBlockPos))) { +- i++; +- mutableBlockPos.move(Direction.UP); ++ while (j < i && canPlaceAt(level, blockposition_mutableblockposition, level.getBlockState(blockposition_mutableblockposition))) { ++ ++j; ++ blockposition_mutableblockposition.move(Direction.UP); + } + +- int i1 = pos.getY() + i - 1; +- mutableBlockPos.setY(pos.getY()); ++ int k = pos.getY() + j - 1; + +- while (mutableBlockPos.getY() < i1) { +- BigDripleafStemBlock.place(level, mutableBlockPos, level.getFluidState(mutableBlockPos), direction); +- mutableBlockPos.move(Direction.UP); ++ blockposition_mutableblockposition.setY(pos.getY()); ++ ++ while (blockposition_mutableblockposition.getY() < k) { ++ BigDripleafStemBlock.place(level, blockposition_mutableblockposition, level.getFluidState(blockposition_mutableblockposition), direction); ++ blockposition_mutableblockposition.move(Direction.UP); + } + +- place(level, mutableBlockPos, level.getFluidState(mutableBlockPos), direction); ++ place(level, blockposition_mutableblockposition, level.getFluidState(blockposition_mutableblockposition), direction); + } + +- private static boolean canReplace(BlockState state) { ++ private static boolean canReplace(IBlockData state) { + return state.isAir() || state.is(Blocks.WATER) || state.is(Blocks.SMALL_DRIPLEAF); + } + +- protected static boolean canPlaceAt(LevelHeightAccessor level, BlockPos pos, BlockState state) { ++ protected static boolean canPlaceAt(LevelHeightAccessor level, BlockPos pos, IBlockData state) { + return !level.isOutsideBuildHeight(pos) && canReplace(state); + } + + protected static boolean place(LevelAccessor level, BlockPos pos, FluidState fluidState, Direction direction) { +- BlockState blockState = Blocks.BIG_DRIPLEAF +- .defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER))) +- .setValue(FACING, direction); +- return level.setBlock(pos, blockState, 3); ++ IBlockData iblockdata = (IBlockData) ((IBlockData) Blocks.BIG_DRIPLEAF.defaultBlockState().setValue(BigDripleafBlock.WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER))).setValue(BigDripleafBlock.FACING, direction); ++ ++ return level.setBlock(pos, iblockdata, 3); + } + + @Override +- public void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) { +- this.setTiltAndScheduleTick(state, level, hit.getBlockPos(), Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN); ++ public void onProjectileHit(Level level, IBlockData state, BlockHitResult hit, Projectile projectile) { ++ this.setTiltAndScheduleTick(state, level, hit.getBlockPos(), Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, projectile); // CraftBukkit + } + + @Override +- public FluidState getFluidState(BlockState state) { +- return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); ++ public FluidState getFluidState(IBlockData state) { ++ return (Boolean) state.getValue(BigDripleafBlock.WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); + } + + @Override +- public boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { +- BlockPos blockPos = pos.below(); +- BlockState blockState = level.getBlockState(blockPos); +- return blockState.is(this) || blockState.is(Blocks.BIG_DRIPLEAF_STEM) || blockState.is(BlockTags.BIG_DRIPLEAF_PLACEABLE); ++ public boolean canSurvive(IBlockData state, LevelReader level, BlockPos pos) { ++ BlockPos blockposition1 = pos.below(); ++ IBlockData iblockdata1 = level.getBlockState(blockposition1); ++ ++ return iblockdata1.is((Block) this) || iblockdata1.is(Blocks.BIG_DRIPLEAF_STEM) || iblockdata1.is(BlockTags.BIG_DRIPLEAF_PLACEABLE); + } + + @Override +- public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor level, BlockPos pos, BlockPos neighborPos) { ++ public IBlockData updateShape(IBlockData state, Direction direction, IBlockData neighborState, LevelAccessor level, BlockPos pos, BlockPos neighborPos) { + if (direction == Direction.DOWN && !state.canSurvive(level, pos)) { + return Blocks.AIR.defaultBlockState(); + } else { +- if (state.getValue(WATERLOGGED)) { +- level.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); ++ if ((Boolean) state.getValue(BigDripleafBlock.WATERLOGGED)) { ++ level.scheduleTick(pos, (Fluid) Fluids.WATER, Fluids.WATER.getTickDelay(level)); + } + +- return direction == Direction.UP && neighborState.is(this) +- ? Blocks.BIG_DRIPLEAF_STEM.withPropertiesOf(state) +- : super.updateShape(state, direction, neighborState, level, pos, neighborPos); ++ return direction == Direction.UP && neighborState.is((Block) this) ? Blocks.BIG_DRIPLEAF_STEM.withPropertiesOf(state) : super.updateShape(state, direction, neighborState, level, pos, neighborPos); + } + } + + @Override +- public boolean isValidBonemealTarget(LevelReader levelReader, BlockPos blockPos, BlockState blockState) { +- BlockState blockState1 = levelReader.getBlockState(blockPos.above()); +- return canReplace(blockState1); ++ public boolean isValidBonemealTarget(LevelReader iworldreader, BlockPos blockposition, IBlockData iblockdata) { ++ IBlockData iblockdata1 = iworldreader.getBlockState(blockposition.above()); ++ ++ return canReplace(iblockdata1); + } + + @Override +- public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) { ++ public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, IBlockData state) { + return true; + } + + @Override +- public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { +- BlockPos blockPos = pos.above(); +- BlockState blockState = level.getBlockState(blockPos); +- if (canPlaceAt(level, blockPos, blockState)) { +- Direction direction = state.getValue(FACING); +- BigDripleafStemBlock.place(level, pos, state.getFluidState(), direction); +- place(level, blockPos, blockState.getFluidState(), direction); ++ public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, IBlockData state) { ++ BlockPos blockposition1 = pos.above(); ++ IBlockData iblockdata1 = level.getBlockState(blockposition1); ++ ++ if (canPlaceAt(level, blockposition1, iblockdata1)) { ++ Direction enumdirection = (Direction) state.getValue(BigDripleafBlock.FACING); ++ ++ BigDripleafStemBlock.place(level, pos, state.getFluidState(), enumdirection); ++ place(level, blockposition1, iblockdata1.getFluidState(), enumdirection); + } ++ + } + + @Override +- public void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { ++ public void entityInside(IBlockData state, Level level, BlockPos pos, Entity entity) { + if (!level.isClientSide) { +- if (state.getValue(TILT) == Tilt.NONE && canEntityTilt(pos, entity) && !level.hasNeighborSignal(pos)) { +- this.setTiltAndScheduleTick(state, level, pos, Tilt.UNSTABLE, null); ++ if (state.getValue(BigDripleafBlock.TILT) == Tilt.NONE && canEntityTilt(pos, entity) && !level.hasNeighborSignal(pos)) { ++ // CraftBukkit start - tilt dripleaf ++ org.bukkit.event.Cancellable cancellable; ++ if (entity instanceof Player) { ++ cancellable = CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null); ++ } else { ++ cancellable = new EntityInteractEvent(entity.getBukkitEntity(), level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); ++ level.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable); ++ } ++ ++ if (cancellable.isCancelled()) { ++ return; ++ } ++ this.setTiltAndScheduleTick(state, level, pos, Tilt.UNSTABLE, (SoundEvent) null, entity); ++ // CraftBukkit end + } ++ + } + } + + @Override +- public void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { ++ public void tick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) { + if (level.hasNeighborSignal(pos)) { + resetTilt(state, level, pos); + } else { +- Tilt tilt = state.getValue(TILT); ++ Tilt tilt = (Tilt) state.getValue(BigDripleafBlock.TILT); ++ + if (tilt == Tilt.UNSTABLE) { +- this.setTiltAndScheduleTick(state, level, pos, Tilt.PARTIAL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN); ++ this.setTiltAndScheduleTick(state, level, pos, Tilt.PARTIAL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit + } else if (tilt == Tilt.PARTIAL) { +- this.setTiltAndScheduleTick(state, level, pos, Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN); ++ this.setTiltAndScheduleTick(state, level, pos, Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit + } else if (tilt == Tilt.FULL) { + resetTilt(state, level, pos); + } ++ + } + } + + @Override +- public void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, BlockPos neighborPos, boolean movedByPiston) { ++ public void neighborChanged(IBlockData state, Level level, BlockPos pos, Block neighborBlock, BlockPos neighborPos, boolean movedByPiston) { + if (level.hasNeighborSignal(pos)) { + resetTilt(state, level, pos); + } ++ + } + + private static void playTiltSound(Level level, BlockPos pos, SoundEvent sound) { + float f = Mth.randomBetween(level.random, 0.8F, 1.2F); +- level.playSound(null, pos, sound, SoundSource.BLOCKS, 1.0F, f); ++ ++ level.playSound((Player) null, pos, sound, SoundSource.BLOCKS, 1.0F, f); + } + + private static boolean canEntityTilt(BlockPos pos, Entity entity) { +- return entity.onGround() && entity.position().y > (double)((float)pos.getY() + 0.6875F); ++ return entity.onGround() && entity.position().y > (double) ((float) pos.getY() + 0.6875F); + } + +- private void setTiltAndScheduleTick(BlockState state, Level level, BlockPos pos, Tilt tilt, @Nullable SoundEvent sound) { +- setTilt(state, level, pos, tilt); +- if (sound != null) { +- playTiltSound(level, pos, sound); ++ // CraftBukkit start ++ private void setTiltAndScheduleTick(IBlockData iblockdata, Level world, BlockPos blockposition, Tilt tilt, @Nullable SoundEvent soundeffect, @Nullable Entity entity) { ++ if (!setTilt(iblockdata, world, blockposition, tilt, entity)) return; ++ // CraftBukkit end ++ if (soundeffect != null) { ++ playTiltSound(world, blockposition, soundeffect); + } + +- int _int = DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt); +- if (_int != -1) { +- level.scheduleTick(pos, this, _int); ++ int i = BigDripleafBlock.DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt); ++ ++ if (i != -1) { ++ world.scheduleTick(blockposition, (Block) this, i); + } ++ + } + +- private static void resetTilt(BlockState state, Level level, BlockPos pos) { +- setTilt(state, level, pos, Tilt.NONE); +- if (state.getValue(TILT) != Tilt.NONE) { ++ private static void resetTilt(IBlockData state, Level level, BlockPos pos) { ++ setTilt(state, level, pos, Tilt.NONE, null); // CraftBukkit ++ if (state.getValue(BigDripleafBlock.TILT) != Tilt.NONE) { + playTiltSound(level, pos, SoundEvents.BIG_DRIPLEAF_TILT_UP); + } ++ + } + +- private static void setTilt(BlockState state, Level level, BlockPos pos, Tilt tilt) { +- Tilt tilt1 = state.getValue(TILT); +- level.setBlock(pos, state.setValue(TILT, tilt), 2); ++ // CraftBukkit start ++ private static boolean setTilt(IBlockData iblockdata, Level world, BlockPos blockposition, Tilt tilt, @Nullable Entity entity) { ++ if (entity != null) { ++ if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata.setValue(BigDripleafBlock.TILT, tilt))) { ++ return false; ++ } ++ } ++ // CraftBukkit end ++ Tilt tilt1 = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT); ++ ++ world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BigDripleafBlock.TILT, tilt), 2); + if (tilt.causesVibration() && tilt != tilt1) { +- level.gameEvent(null, GameEvent.BLOCK_CHANGE, pos); ++ world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, blockposition); + } ++ ++ return true; // CraftBukkit + } + + @Override +- public VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +- return LEAF_SHAPES.get(state.getValue(TILT)); ++ public VoxelShape getCollisionShape(IBlockData state, BlockGetter level, BlockPos pos, CollisionContext context) { ++ return (VoxelShape) BigDripleafBlock.LEAF_SHAPES.get(state.getValue(BigDripleafBlock.TILT)); + } + + @Override +- public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +- return this.shapesCache.get(state); ++ public VoxelShape getShape(IBlockData state, BlockGetter level, BlockPos pos, CollisionContext context) { ++ return (VoxelShape) this.shapesCache.get(state); + } + + @Override +- public BlockState getStateForPlacement(BlockPlaceContext context) { +- BlockState blockState = context.getLevel().getBlockState(context.getClickedPos().below()); +- FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- boolean flag = blockState.is(Blocks.BIG_DRIPLEAF) || blockState.is(Blocks.BIG_DRIPLEAF_STEM); +- return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER))) +- .setValue(FACING, flag ? blockState.getValue(FACING) : context.getHorizontalDirection().getOpposite()); ++ public IBlockData getStateForPlacement(BlockPlaceContext context) { ++ IBlockData iblockdata = context.getLevel().getBlockState(context.getClickedPos().below()); ++ FluidState fluid = context.getLevel().getFluidState(context.getClickedPos()); ++ boolean flag = iblockdata.is(Blocks.BIG_DRIPLEAF) || iblockdata.is(Blocks.BIG_DRIPLEAF_STEM); ++ ++ return (IBlockData) ((IBlockData) this.defaultBlockState().setValue(BigDripleafBlock.WATERLOGGED, fluid.isSourceOfType(Fluids.WATER))).setValue(BigDripleafBlock.FACING, flag ? (Direction) iblockdata.getValue(BigDripleafBlock.FACING) : context.getHorizontalDirection().getOpposite()); + } + + @Override +- protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { +- builder.add(WATERLOGGED, FACING, TILT); ++ protected void createBlockStateDefinition(StateDefinition.Builder<Block, IBlockData> builder) { ++ builder.add(BigDripleafBlock.WATERLOGGED, BigDripleafBlock.FACING, BigDripleafBlock.TILT); + } + } |