aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch
new file mode 100644
index 0000000000..ba8684303f
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DragonEggBlock.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/block/DragonEggBlock.java
++++ b/net/minecraft/world/level/block/DragonEggBlock.java
+@@ -16,6 +16,7 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.BlockFromToEvent; // CraftBukkit
+
+ public class DragonEggBlock extends FallingBlock {
+
+@@ -57,7 +54,19 @@
+ for (int i = 0; i < 1000; ++i) {
+ BlockPos blockpos1 = blockpos.offset(level.random.nextInt(16) - level.random.nextInt(16), level.random.nextInt(8) - level.random.nextInt(8), level.random.nextInt(16) - level.random.nextInt(16));
+
+- if (level.getBlockState(blockpos1).isAir() && worldborder.isWithinBounds(blockpos1)) {
++ if (level.getBlockState(blockposition1).isAir() && worldborder.isWithinBounds(blockposition1)) {
++ // CraftBukkit start
++ org.bukkit.block.Block from = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++ org.bukkit.block.Block to = level.getWorld().getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
++ BlockFromToEvent event = new BlockFromToEvent(from, to);
++ org.bukkit.Bukkit.getPluginManager().callEvent(event);
++
++ if (event.isCancelled()) {
++ return;
++ }
++
++ blockposition1 = new BlockPos(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ());
++ // CraftBukkit end
+ if (level.isClientSide) {
+ for (int j = 0; j < 128; ++j) {
+ double d0 = level.random.nextDouble();