Update EditSession.rawSetBlock() to limit Y between 0 and 127.

This commit is contained in:
sk89q 2010-11-04 23:36:54 -07:00
parent 767c445f4c
commit 778314f9e4

View File

@ -102,6 +102,11 @@ public class EditSession {
* @return Whether the block changed
*/
private boolean rawSetBlock(Vector pt, BaseBlock block) {
int y = pt.getBlockY();
if (y < 0 || y > 127) {
return false;
}
boolean result = server.setBlockType(pt, block.getID());
if (block.getID() != 0) {
server.setBlockData(pt, block.getData());