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/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch b/patch-remap/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch new file mode 100644 index 0000000000..bab47f75c2 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java ++++ b/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java +@@ -200,8 +200,19 @@ + double d3 = Math.sqrt(d0 * d0 + d2 * d2); + + entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4)); ++ // CraftBukkit start ++ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), null, entityarrow, net.minecraft.world.EnumHand.MAIN_HAND, 0.8F, true); ++ if (event.isCancelled()) { ++ event.getProjectile().remove(); ++ return; ++ } ++ ++ if (event.getProjectile() == entityarrow.getBukkitEntity()) { ++ this.level().addFreshEntity(entityarrow); ++ } ++ // CraftBukkit end + this.playSound(SoundEffects.SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); +- this.level().addFreshEntity(entityarrow); ++ // this.level().addFreshEntity(entityarrow); // CraftBukkit - moved up + } + + protected EntityArrow getArrow(ItemStack itemstack, float f) { |