kept players yaw and pitch while walking through a gate; saving of actual gate size (preventing resizing of gates after creation); all credit goes to s1m0ne

This commit is contained in:
Tobias Ottenweller
2012-02-25 17:46:19 +01:00
parent 4a6b5902e3
commit ccc9a27917
6 changed files with 81 additions and 19 deletions

View File

@ -45,7 +45,7 @@ public class FloodUtil {
if (blocks1.size() > blocks2.size()) {
return blocks2;
}
return blocks1;
}
@ -54,8 +54,10 @@ public class FloodUtil {
return null;
}
//System.out.println("limit: " + limit);
if (foundBlocks.size() > limit) {
return null;
System.out.println("Exceeding gate size limit.");
return null;
}
if (foundBlocks.contains(startBlock)) {
@ -68,11 +70,13 @@ public class FloodUtil {
// ... And flood away !
for (BlockFace face : expandFaces) {
Block potentialBlock = startBlock.getFace(face);
Block potentialBlock = startBlock.getRelative(face);
foundBlocks = getAirFloodBlocks(potentialBlock, foundBlocks, expandFaces, limit);
}
}
if (foundBlocks != null) {
//System.out.println("size: " + foundBlocks.size());
}
return foundBlocks;
}