mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Added in a valid block ID check in EditSession.rawSetBlock().
This commit is contained in:
parent
a8c0b7c3d4
commit
b78d43d95c
@ -143,11 +143,17 @@ public class EditSession {
|
|||||||
*/
|
*/
|
||||||
protected boolean rawSetBlock(Vector pt, BaseBlock block) {
|
protected boolean rawSetBlock(Vector pt, BaseBlock block) {
|
||||||
int y = pt.getBlockY();
|
int y = pt.getBlockY();
|
||||||
|
int type = block.getType();
|
||||||
|
|
||||||
if (y < 0 || y > 127) {
|
if (y < 0 || y > 127) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No invalid blocks
|
||||||
|
if ((type > 25 && type < 35) || type == 36 || type > 92) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int existing = world.getBlockType(pt);
|
int existing = world.getBlockType(pt);
|
||||||
|
|
||||||
// Clear the container block so that it doesn't drop items
|
// Clear the container block so that it doesn't drop items
|
||||||
|
Loading…
Reference in New Issue
Block a user