@@ -24,18 +24,18 @@
|
||||
BlockPortal.Shape blockportal_shape = new BlockPortal.Shape(world, blockposition, EnumDirection.EnumAxis.X);
|
||||
|
||||
if (blockportal_shape.d() && blockportal_shape.e == 0) {
|
||||
- blockportal_shape.e();
|
||||
- blockportal_shape.createPortal();
|
||||
- return true;
|
||||
+ // CraftBukkit start - return portalcreator
|
||||
+ return blockportal_shape.e();
|
||||
+ return blockportal_shape.createPortal();
|
||||
+ // return true;
|
||||
} else {
|
||||
BlockPortal.Shape blockportal_shape1 = new BlockPortal.Shape(world, blockposition, EnumDirection.EnumAxis.Z);
|
||||
|
||||
if (blockportal_shape1.d() && blockportal_shape1.e == 0) {
|
||||
- blockportal_shape1.e();
|
||||
- blockportal_shape1.createPortal();
|
||||
- return true;
|
||||
+ return blockportal_shape1.e();
|
||||
+ return blockportal_shape1.createPortal();
|
||||
+ // return true;
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
@@ -53,9 +53,9 @@
|
||||
}
|
||||
|
||||
@@ -185,6 +195,7 @@
|
||||
private BlockPosition f;
|
||||
private int g;
|
||||
private int h;
|
||||
private BlockPosition position;
|
||||
private int height;
|
||||
private int width;
|
||||
+ java.util.Collection<org.bukkit.block.Block> blocks = new java.util.HashSet<org.bukkit.block.Block>(); // CraftBukkit - add field
|
||||
|
||||
public Shape(World world, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
|
||||
@@ -81,7 +81,7 @@
|
||||
+ blocks.add(bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else if (i == this.h - 1) {
|
||||
} else if (i == this.width - 1) {
|
||||
block = this.a.getType(blockposition.shift(this.c)).getBlock();
|
||||
if (block != Blocks.OBSIDIAN) {
|
||||
break label56;
|
||||
@@ -94,31 +94,31 @@
|
||||
}
|
||||
}
|
||||
@@ -277,6 +302,11 @@
|
||||
if (this.a.getType(this.f.shift(this.c, i).up(this.g)).getBlock() != Blocks.OBSIDIAN) {
|
||||
this.g = 0;
|
||||
if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) {
|
||||
this.height = 0;
|
||||
break;
|
||||
+ // CraftBukkit start - add the block to our list
|
||||
+ } else {
|
||||
+ BlockPosition pos = this.f.shift(this.c, i).up(this.g);
|
||||
+ BlockPosition pos = this.position.shift(this.c, i).up(this.height);
|
||||
+ blocks.add(bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +328,27 @@
|
||||
return this.f != null && this.h >= 2 && this.h <= 21 && this.g >= 3 && this.g <= 21;
|
||||
return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
||||
}
|
||||
|
||||
- public void e() {
|
||||
- public void createPortal() {
|
||||
+ // CraftBukkit start - return boolean
|
||||
+ public boolean e() {
|
||||
+ public boolean createPortal() {
|
||||
+ org.bukkit.World bworld = this.a.getWorld();
|
||||
+
|
||||
+ // Copy below for loop
|
||||
+ for (int i = 0; i < this.h; ++i) {
|
||||
+ BlockPosition blockposition = this.f.shift(this.c, i);
|
||||
+ for (int i = 0; i < this.width; ++i) {
|
||||
+ BlockPosition blockposition = this.position.shift(this.c, i);
|
||||
+
|
||||
+ for (int j = 0; j < this.g; ++j) {
|
||||
+ for (int j = 0; j < this.height; ++j) {
|
||||
+ BlockPosition pos = blockposition.up(j);
|
||||
+ blocks.add(bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ }
|
||||
@@ -131,8 +131,8 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
for (int i = 0; i < this.h; ++i) {
|
||||
BlockPosition blockposition = this.f.shift(this.c, i);
|
||||
for (int i = 0; i < this.width; ++i) {
|
||||
BlockPosition blockposition = this.position.shift(this.c, i);
|
||||
|
||||
@@ -307,6 +357,7 @@
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user