aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/DamageEnchantment.java.patch11
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch18
2 files changed, 29 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/DamageEnchantment.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/DamageEnchantment.java.patch
new file mode 100644
index 0000000000..48596baafd
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/DamageEnchantment.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/item/enchantment/DamageEnchantment.java
++++ b/net/minecraft/world/item/enchantment/DamageEnchantment.java
+@@ -70,7 +63,7 @@
+ if (this.type == 2 && i > 0 && livingentity1.getMobType() == MobType.ARTHROPOD) {
+ int j = 20 + livingentity.getRandom().nextInt(10 * i);
+
+- livingentity1.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, j, 3));
++ entityliving1.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, j, 3), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+ }
+ }
+
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch
new file mode 100644
index 0000000000..76b89e3376
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java
++++ b/net/minecraft/world/item/enchantment/FrostWalkerEnchantment.java
+@@ -58,9 +54,12 @@
+ if (blockstate1.isAir()) {
+ BlockState blockstate2 = level.getBlockState(blockpos1);
+
+- if (blockstate2 == FrostedIceBlock.meltsInto() && blockstate.canSurvive(level, blockpos1) && level.isUnobstructed(blockstate, blockpos1, CollisionContext.empty())) {
+- level.setBlockAndUpdate(blockpos1, blockstate);
+- level.scheduleTick(blockpos1, Blocks.FROSTED_ICE, Mth.nextInt(livingentity.getRandom(), 60, 120));
++ 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
+ }
+ }
+ }