Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Don't attempt to update empty or invalid flower pots.
Dieser Commit ist enthalten in:
Ursprung
4804fe64e3
Commit
4b15439e03
@ -41,6 +41,9 @@ public class FlowerPotCompatibilityHandler implements NBTCompatibilityHandler {
|
|||||||
Tag item = values.get("Item");
|
Tag item = values.get("Item");
|
||||||
if (item instanceof StringTag) {
|
if (item instanceof StringTag) {
|
||||||
String id = ((StringTag) item).getValue();
|
String id = ((StringTag) item).getValue();
|
||||||
|
if (id.isEmpty()) {
|
||||||
|
return (B) BlockTypes.FLOWER_POT.getDefaultState();
|
||||||
|
}
|
||||||
int data = 0;
|
int data = 0;
|
||||||
Tag dataTag = values.get("Data");
|
Tag dataTag = values.get("Data");
|
||||||
if (dataTag instanceof IntTag) {
|
if (dataTag instanceof IntTag) {
|
||||||
@ -75,7 +78,7 @@ public class FlowerPotCompatibilityHandler implements NBTCompatibilityHandler {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
String plantedName = null;
|
String plantedName = null;
|
||||||
if (newId == 0) {
|
if (newId == 0 && id.startsWith("minecraft:")) {
|
||||||
plantedName = id.substring(10);
|
plantedName = id.substring(10);
|
||||||
} else {
|
} else {
|
||||||
BlockState plantedWithData = LegacyMapper.getInstance().getBlockFromLegacy(newId, data);
|
BlockState plantedWithData = LegacyMapper.getInstance().getBlockFromLegacy(newId, data);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren