mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-25 09:04:27 +00:00
Expanded the scope of item brushes (/br apply item, /br paint item).
They now additionally take a direction in which the simulated item usage should be facing. Also allow the item parser to parse "hand" and "offhand" as items, to allow platforms with NBT item support return items with NBT (since parsing is a slightly more complex task).
This commit is contained in:
@ -116,7 +116,7 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
|
||||
@Override
|
||||
public String getNbtId() {
|
||||
return "MobSpawner";
|
||||
return "minecraft:mob_spawner";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -154,8 +154,8 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
Map<String, Tag> values = rootTag.getValue();
|
||||
|
||||
Tag t = values.get("id");
|
||||
if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals("MobSpawner")) {
|
||||
throw new RuntimeException("'MobSpawner' tile entity expected");
|
||||
if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals(getNbtId())) {
|
||||
throw new RuntimeException(String.format("'%s' tile entity expected", getNbtId()));
|
||||
}
|
||||
|
||||
CompoundTag spawnDataTag;
|
||||
@ -169,6 +169,7 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
throw new InvalidFormatException("No spawn id.");
|
||||
}
|
||||
this.mobType = mobType;
|
||||
this.spawnData = spawnDataTag;
|
||||
} catch (InvalidFormatException ignored) {
|
||||
throw new RuntimeException("Invalid mob spawner data: no SpawnData and/or no Delay");
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class SignBlock extends BaseBlock {
|
||||
|
||||
@Override
|
||||
public String getNbtId() {
|
||||
return "Sign";
|
||||
return "minecraft:sign";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,8 +114,8 @@ public class SignBlock extends BaseBlock {
|
||||
text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY };
|
||||
|
||||
t = values.get("id");
|
||||
if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals("Sign")) {
|
||||
throw new RuntimeException("'Sign' tile entity expected");
|
||||
if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals(getNbtId())) {
|
||||
throw new RuntimeException(String.format("'%s' tile entity expected", getNbtId()));
|
||||
}
|
||||
|
||||
t = values.get("Text1");
|
||||
|
Reference in New Issue
Block a user