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

Updated for SpoutAPI changes, again.

Dieser Commit ist enthalten in:
zml2008 2012-01-14 16:56:36 -08:00
Ursprung a6bba00f77
Commit b4a170b265

Datei anzeigen

@ -70,7 +70,8 @@ public class SpoutWorld extends LocalWorld {
*/
@Override
public boolean setBlockType(Vector pt, int type) {
return world.getBlock(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).setBlockId((short)type) != type;
world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type);
return world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()) != type;
}
/**
@ -94,8 +95,9 @@ public class SpoutWorld extends LocalWorld {
*/
@Override
public boolean setTypeIdAndData(Vector pt, int type, int data) {
return world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type) != type
&& world.setBlockData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (byte)data) != data;
int origType = getBlockType(pt), origData = getBlockData(pt);
world.setBlockIdAndData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data);
return origType != type && origData != data;
}
/**
@ -109,7 +111,6 @@ public class SpoutWorld extends LocalWorld {
@Override
public boolean setTypeIdAndDataFast(Vector pt, int type, int data) {
return setTypeIdAndData(pt, type, data);
//return world.getBlockAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).setTypeIdAndData(type, (byte) data, false);
}
/**
@ -131,7 +132,7 @@ public class SpoutWorld extends LocalWorld {
*/
@Override
public void setBlockData(Vector pt, int data) {
world.setBlockData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (byte)data);
setTypeIdAndData(pt, world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()), data);
}
/**
@ -690,7 +691,7 @@ public class SpoutWorld extends LocalWorld {
*/
@Override
public boolean isValidBlockType(int type) {
return type <= 255 && MaterialData.getMaterial((short)type) != null;
return MaterialData.getBlock((short)type) != null;
}
@Override