3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 20:10:06 +01:00

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

Dieser Commit ist enthalten in:
sk89q 2010-11-04 23:36:54 -07:00
Ursprung 767c445f4c
Commit 778314f9e4

Datei anzeigen

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