diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch new file mode 100644 index 0000000000..89a7a488e8 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch @@ -0,0 +1,36 @@ +--- a/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java ++++ b/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java +@@ -41,17 +44,22 @@ + int min = Math.min(16, 2 + levelConflicting); + BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); + +- for (BlockPos blockPos : BlockPos.betweenClosed(pos.offset(-min, -1, -min), pos.offset(min, -1, min))) { +- if (blockPos.closerToCenterThan(living.position(), (double)min)) { +- mutableBlockPos.set(blockPos.getX(), blockPos.getY() + 1, blockPos.getZ()); +- BlockState blockState1 = level.getBlockState(mutableBlockPos); +- if (blockState1.isAir()) { +- BlockState blockState2 = level.getBlockState(blockPos); +- if (blockState2 == FrostedIceBlock.meltsInto() +- && blockState.canSurvive(level, blockPos) +- && level.isUnobstructed(blockState, blockPos, CollisionContext.empty())) { +- level.setBlockAndUpdate(blockPos, blockState); +- level.scheduleTick(blockPos, Blocks.FROSTED_ICE, Mth.nextInt(living.getRandom(), 60, 120)); ++ while (iterator.hasNext()) { ++ BlockPos blockposition1 = (BlockPos) iterator.next(); ++ ++ if (blockposition1.closerToCenterThan(living.position(), (double) j)) { ++ blockposition_mutableblockposition.set(blockposition1.getX(), blockposition1.getY() + 1, blockposition1.getZ()); ++ IBlockData iblockdata1 = level.getBlockState(blockposition_mutableblockposition); ++ ++ if (iblockdata1.isAir()) { ++ IBlockData iblockdata2 = level.getBlockState(blockposition1); ++ ++ if (iblockdata2 == FrostedIceBlock.meltsInto() && iblockdata.canSurvive(level, blockposition1) && level.isUnobstructed(iblockdata, blockposition1, CollisionContext.empty())) { ++ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, blockposition1, iblockdata, living)) { ++ level.scheduleTick(blockposition1, Blocks.FROSTED_ICE, Mth.nextInt(living.getRandom(), 60, 120)); ++ } ++ // CraftBukkit End + } + } + } |