Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
31 Zeilen
1.6 KiB
Diff
31 Zeilen
1.6 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/BlockDragonEgg.java 2014-11-28 17:43:42.897707439 +0000
|
|
+++ src/main/java/net/minecraft/server/BlockDragonEgg.java 2014-11-28 17:38:19.000000000 +0000
|
|
@@ -2,6 +2,8 @@
|
|
|
|
import java.util.Random;
|
|
|
|
+import org.bukkit.event.block.BlockFromToEvent; // CraftBukkit
|
|
+
|
|
public class BlockDragonEgg extends Block {
|
|
|
|
public BlockDragonEgg() {
|
|
@@ -61,6 +63,18 @@
|
|
BlockPosition blockposition1 = blockposition.a(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16));
|
|
|
|
if (world.getType(blockposition1).getBlock().material == Material.AIR) {
|
|
+ // CraftBukkit start
|
|
+ org.bukkit.block.Block from = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
|
+ org.bukkit.block.Block to = world.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 BlockPosition(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ());
|
|
+ // CraftBukkit end
|
|
if (world.isStatic) {
|
|
for (int j = 0; j < 128; ++j) {
|
|
double d0 = world.random.nextDouble();
|