mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Updated for SpoutAPI changes, again.
This commit is contained in:
parent
a6bba00f77
commit
b4a170b265
@ -70,7 +70,8 @@ public class SpoutWorld extends LocalWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean setBlockType(Vector pt, int type) {
|
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
|
@Override
|
||||||
public boolean setTypeIdAndData(Vector pt, int type, int data) {
|
public boolean setTypeIdAndData(Vector pt, int type, int data) {
|
||||||
return world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type) != type
|
int origType = getBlockType(pt), origData = getBlockData(pt);
|
||||||
&& world.setBlockData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (byte)data) != data;
|
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
|
@Override
|
||||||
public boolean setTypeIdAndDataFast(Vector pt, int type, int data) {
|
public boolean setTypeIdAndDataFast(Vector pt, int type, int data) {
|
||||||
return setTypeIdAndData(pt, type, 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
|
@Override
|
||||||
public void setBlockData(Vector pt, int data) {
|
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
|
@Override
|
||||||
public boolean isValidBlockType(int type) {
|
public boolean isValidBlockType(int type) {
|
||||||
return type <= 255 && MaterialData.getMaterial((short)type) != null;
|
return MaterialData.getBlock((short)type) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user