summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockDragonEgg.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockDragonEgg.java')
-rw-r--r--src/main/java/net/minecraft/server/BlockDragonEgg.java47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDragonEgg.java b/src/main/java/net/minecraft/server/BlockDragonEgg.java
index 2b4257c9..5deafecd 100644
--- a/src/main/java/net/minecraft/server/BlockDragonEgg.java
+++ b/src/main/java/net/minecraft/server/BlockDragonEgg.java
@@ -56,30 +56,31 @@ public class BlockDragonEgg extends Block {
private void n(World world, int i, int j, int k) {
if (world.getTypeId(i, j, k) == this.id) {
- if (!world.isStatic) {
- for (int l = 0; l < 1000; ++l) {
- int i1 = i + world.random.nextInt(16) - world.random.nextInt(16);
- int j1 = j + world.random.nextInt(8) - world.random.nextInt(8);
- int k1 = k + world.random.nextInt(16) - world.random.nextInt(16);
-
- if (world.getTypeId(i1, j1, k1) == 0) {
- // CraftBukkit start
- org.bukkit.block.Block from = world.getWorld().getBlockAt(i, j, k);
- org.bukkit.block.Block to = world.getWorld().getBlockAt(i1, j1, k1);
- BlockFromToEvent event = new BlockFromToEvent(from, to);
- org.bukkit.Bukkit.getPluginManager().callEvent(event);
-
- if (event.isCancelled()) {
- return;
- }
+ for (int l = 0; l < 1000; ++l) {
+ int i1 = i + world.random.nextInt(16) - world.random.nextInt(16);
+ int j1 = j + world.random.nextInt(8) - world.random.nextInt(8);
+ int k1 = k + world.random.nextInt(16) - world.random.nextInt(16);
+
+ if (world.getTypeId(i1, j1, k1) == 0) {
+ // CraftBukkit start
+ org.bukkit.block.Block from = world.getWorld().getBlockAt(i, j, k);
+ org.bukkit.block.Block to = world.getWorld().getBlockAt(i1, j1, k1);
+ BlockFromToEvent event = new BlockFromToEvent(from, to);
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ return;
+ }
- i1 = event.getToBlock().getX();
- j1 = event.getToBlock().getY();
- k1 = event.getToBlock().getZ();
- // CraftBukkit end
+ i1 = event.getToBlock().getX();
+ j1 = event.getToBlock().getY();
+ k1 = event.getToBlock().getZ();
+ // CraftBukkit end
+ if (!world.isStatic) {
world.setTypeIdAndData(i1, j1, k1, this.id, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
+ } else {
short short1 = 128;
for (int l1 = 0; l1 < short1; ++l1) {
@@ -93,16 +94,16 @@ public class BlockDragonEgg extends Block {
world.addParticle("portal", d1, d2, d3, (double) f, (double) f1, (double) f2);
}
-
- return;
}
+
+ return;
}
}
}
}
public int r_() {
- return 3;
+ return 5;
}
public boolean c() {