aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
committerMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
commitbee74680e607c2e29b038329f62181238911cd83 (patch)
tree708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch
parent0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff)
downloadPaper-softspoon.tar.gz
Paper-softspoon.zip
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch
new file mode 100644
index 0000000000..84f29ce627
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/world/level/block/IceBlock.java.patch
@@ -0,0 +1,74 @@
+--- a/net/minecraft/world/level/block/IceBlock.java
++++ b/net/minecraft/world/level/block/IceBlock.java
+@@ -9,30 +9,31 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.enchantment.EnchantmentHelper;
+ import net.minecraft.world.item.enchantment.Enchantments;
++import net.minecraft.world.level.EnumSkyBlock;
+ import net.minecraft.world.level.Level;
+-import net.minecraft.world.level.LightLayer;
+ import net.minecraft.world.level.block.entity.BlockEntity;
+ 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 IceBlock extends HalfTransparentBlock {
++
+ public static final MapCodec<IceBlock> CODEC = simpleCodec(IceBlock::new);
+
+ @Override
+ public MapCodec<? extends IceBlock> codec() {
+- return CODEC;
++ return IceBlock.CODEC;
+ }
+
+ public IceBlock(BlockBehaviour.Properties properties) {
+ super(properties);
+ }
+
+- public static BlockState meltsInto() {
++ public static IBlockData meltsInto() {
+ return Blocks.WATER.defaultBlockState();
+ }
+
+ @Override
+- public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity te, ItemStack stack) {
++ public void playerDestroy(Level level, Player player, BlockPos pos, IBlockData state, @Nullable BlockEntity te, ItemStack stack) {
+ super.playerDestroy(level, player, pos, state, te, stack);
+ if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, stack) == 0) {
+ if (level.dimensionType().ultraWarm()) {
+@@ -40,21 +41,29 @@
+ return;
+ }
+
+- BlockState blockState = level.getBlockState(pos.below());
+- if (blockState.blocksMotion() || blockState.liquid()) {
++ IBlockData iblockdata1 = level.getBlockState(pos.below());
++
++ if (iblockdata1.blocksMotion() || iblockdata1.liquid()) {
+ level.setBlockAndUpdate(pos, meltsInto());
+ }
+ }
++
+ }
+
+ @Override
+- public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
+- if (level.getBrightness(LightLayer.BLOCK, pos) > 11 - state.getLightBlock(level, pos)) {
++ public void randomTick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) {
++ if (level.getBrightness(EnumSkyBlock.BLOCK, pos) > 11 - state.getLightBlock(level, pos)) {
+ this.melt(state, level, pos);
+ }
++
+ }
+
+- protected void melt(BlockState state, Level level, BlockPos pos) {
++ protected void melt(IBlockData state, Level level, BlockPos pos) {
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(level, pos, level.dimensionType().ultraWarm() ? Blocks.AIR.defaultBlockState() : Blocks.WATER.defaultBlockState()).isCancelled()) {
++ return;
++ }
++ // CraftBukkit end
+ if (level.dimensionType().ultraWarm()) {
+ level.removeBlock(pos, false);
+ } else {