aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch
new file mode 100644
index 0000000000..b1b431ef39
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/level/block/NetherWartBlock.java.patch
@@ -0,0 +1,84 @@
+--- a/net/minecraft/world/level/block/NetherWartBlock.java
++++ b/net/minecraft/world/level/block/NetherWartBlock.java
+@@ -9,7 +9,7 @@
+ import net.minecraft.world.level.BlockGetter;
+ 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.IntegerProperty;
+@@ -24,55 +24,48 @@
+ private static final VoxelShape[] SHAPE_BY_AGE = new VoxelShape[]{Block.box(0.0D, 0.0D, 0.0D, 16.0D, 5.0D, 16.0D), Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D), Block.box(0.0D, 0.0D, 0.0D, 16.0D, 11.0D, 16.0D), Block.box(0.0D, 0.0D, 0.0D, 16.0D, 14.0D, 16.0D)};
+
+ @Override
+- @Override
+ public MapCodec<NetherWartBlock> codec() {
+ return NetherWartBlock.CODEC;
+ }
+
+- protected NetherWartBlock(BlockBehaviour.Properties blockbehaviour_properties) {
+- super(blockbehaviour_properties);
+- this.registerDefaultState((BlockState) ((BlockState) this.stateDefinition.any()).setValue(NetherWartBlock.AGE, 0));
++ protected NetherWartBlock(BlockBehaviour.Properties properties) {
++ super(properties);
++ this.registerDefaultState((IBlockData) ((IBlockData) this.stateDefinition.any()).setValue(NetherWartBlock.AGE, 0));
+ }
+
+ @Override
+- @Override
+- public VoxelShape getShape(BlockState blockstate, BlockGetter blockgetter, BlockPos blockpos, CollisionContext collisioncontext) {
+- return NetherWartBlock.SHAPE_BY_AGE[(Integer) blockstate.getValue(NetherWartBlock.AGE)];
++ public VoxelShape getShape(IBlockData state, BlockGetter level, BlockPos pos, CollisionContext context) {
++ return NetherWartBlock.SHAPE_BY_AGE[(Integer) state.getValue(NetherWartBlock.AGE)];
+ }
+
+ @Override
+- @Override
+- protected boolean mayPlaceOn(BlockState blockstate, BlockGetter blockgetter, BlockPos blockpos) {
+- return blockstate.is(Blocks.SOUL_SAND);
++ protected boolean mayPlaceOn(IBlockData state, BlockGetter level, BlockPos pos) {
++ return state.is(Blocks.SOUL_SAND);
+ }
+
+ @Override
+- @Override
+- public boolean isRandomlyTicking(BlockState blockstate) {
+- return (Integer) blockstate.getValue(NetherWartBlock.AGE) < 3;
++ public boolean isRandomlyTicking(IBlockData state) {
++ return (Integer) state.getValue(NetherWartBlock.AGE) < 3;
+ }
+
+ @Override
+- @Override
+- public void randomTick(BlockState blockstate, ServerLevel serverlevel, BlockPos blockpos, RandomSource randomsource) {
+- int i = (Integer) blockstate.getValue(NetherWartBlock.AGE);
++ public void randomTick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) {
++ int i = (Integer) state.getValue(NetherWartBlock.AGE);
+
+- if (i < 3 && randomsource.nextInt(10) == 0) {
+- blockstate = (BlockState) blockstate.setValue(NetherWartBlock.AGE, i + 1);
+- serverlevel.setBlock(blockpos, blockstate, 2);
++ if (i < 3 && random.nextInt(10) == 0) {
++ state = (IBlockData) state.setValue(NetherWartBlock.AGE, i + 1);
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state, 2); // CraftBukkit
+ }
+
+ }
+
+ @Override
+- @Override
+- public ItemStack getCloneItemStack(LevelReader levelreader, BlockPos blockpos, BlockState blockstate) {
++ public ItemStack getCloneItemStack(LevelReader iworldreader, BlockPos blockposition, IBlockData iblockdata) {
+ return new ItemStack(Items.NETHER_WART);
+ }
+
+ @Override
+- @Override
+- protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> statedefinition_builder) {
+- statedefinition_builder.add(NetherWartBlock.AGE);
++ protected void createBlockStateDefinition(StateDefinition.Builder<Block, IBlockData> builder) {
++ builder.add(NetherWartBlock.AGE);
+ }
+ }