Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 18:40:05 +01:00
Added a workaround for onBlockDestroy providing (0, 0, 0). Setting air no longer sets the data.
Dieser Commit ist enthalten in:
Ursprung
9e9cd627a3
Commit
c947083640
@ -113,20 +113,23 @@ public class EditSession {
|
|||||||
*/
|
*/
|
||||||
private boolean rawSetBlock(Vector pt, BaseBlock block) {
|
private boolean rawSetBlock(Vector pt, BaseBlock block) {
|
||||||
boolean result = server.setBlockType(pt, block.getID());
|
boolean result = server.setBlockType(pt, block.getID());
|
||||||
// Changes in block data don't take effect if the block type doesn't
|
if (block.getID() != 0) {
|
||||||
// change, so here's a hack!
|
// Changes in block data don't take effect if the block type doesn't
|
||||||
if (!result && block.getID() != 0) {
|
// change, so here's a hack!
|
||||||
server.setBlockType(pt, 0);
|
if (!result) {
|
||||||
result = server.setBlockType(pt, block.getID());
|
server.setBlockType(pt, 0);
|
||||||
}
|
result = server.setBlockType(pt, block.getID());
|
||||||
server.setBlockData(pt, block.getData());
|
}
|
||||||
|
server.setBlockData(pt, block.getData());
|
||||||
|
|
||||||
// Signs
|
// Signs
|
||||||
if (block instanceof SignBlock) {
|
if (block instanceof SignBlock) {
|
||||||
SignBlock signBlock = (SignBlock)block;
|
SignBlock signBlock = (SignBlock)block;
|
||||||
String[] text = signBlock.getText();
|
String[] text = signBlock.getText();
|
||||||
server.setSignText(pt, text);
|
server.setSignText(pt, text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,12 @@ public class SMWorldEditListener extends PluginListener {
|
|||||||
blockClicked.getY(),
|
blockClicked.getY(),
|
||||||
blockClicked.getZ());
|
blockClicked.getZ());
|
||||||
|
|
||||||
|
// Bug workaround
|
||||||
|
if (cur.getBlockX() == 0 && cur.getBlockY() == 0
|
||||||
|
&& cur.getBlockZ() == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (session.getPos1().equals(cur)) {
|
if (session.getPos1().equals(cur)) {
|
||||||
return false;
|
return false;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren