diff options
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/level/block/MagmaBlock.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower/net/minecraft/world/level/block/MagmaBlock.java.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/level/block/MagmaBlock.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/level/block/MagmaBlock.java.patch new file mode 100644 index 0000000000..121ba5692a --- /dev/null +++ b/patch-remap/mache-vineflower/net/minecraft/world/level/block/MagmaBlock.java.patch @@ -0,0 +1,61 @@ +--- a/net/minecraft/world/level/block/MagmaBlock.java ++++ b/net/minecraft/world/level/block/MagmaBlock.java +@@ -11,15 +11,16 @@ + import net.minecraft.world.level.Level; + import net.minecraft.world.level.LevelAccessor; + import net.minecraft.world.level.block.state.BlockBehaviour; +-import net.minecraft.world.level.block.state.BlockState; ++import net.minecraft.world.level.block.state.IBlockData; + + public class MagmaBlock extends Block { ++ + public static final MapCodec<MagmaBlock> CODEC = simpleCodec(MagmaBlock::new); + private static final int BUBBLE_COLUMN_CHECK_DELAY = 20; + + @Override + public MapCodec<MagmaBlock> codec() { +- return CODEC; ++ return MagmaBlock.CODEC; + } + + public MagmaBlock(BlockBehaviour.Properties properties) { +@@ -27,30 +28,32 @@ + } + + @Override +- public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { +- if (!entity.isSteppingCarefully() && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity)) { ++ public void stepOn(Level level, BlockPos pos, IBlockData state, Entity entity) { ++ if (!entity.isSteppingCarefully() && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); // CraftBukkit + entity.hurt(level.damageSources().hotFloor(), 1.0F); ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit + } + + super.stepOn(level, pos, state, entity); + } + + @Override +- public void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { ++ public void tick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) { + BubbleColumnBlock.updateColumn(level, pos.above(), state); + } + + @Override +- public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) { ++ public IBlockData updateShape(IBlockData state, Direction facing, IBlockData facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) { + if (facing == Direction.UP && facingState.is(Blocks.WATER)) { +- level.scheduleTick(currentPos, this, 20); ++ level.scheduleTick(currentPos, (Block) this, 20); + } + + return super.updateShape(state, facing, facingState, level, currentPos, facingPos); + } + + @Override +- public void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { +- level.scheduleTick(pos, this, 20); ++ public void onPlace(IBlockData state, Level level, BlockPos pos, IBlockData oldState, boolean isMoving) { ++ level.scheduleTick(pos, (Block) this, 20); + } + } |