mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: correct NBT for spawners (#2362)
This commit is contained in:
parent
5167073326
commit
cdd546ee5e
@ -134,15 +134,29 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
values.put("MaxNearbyEntities", new ShortTag(maxNearbyEntities));
|
||||
values.put("RequiredPlayerRange", new ShortTag(requiredPlayerRange));
|
||||
if (spawnData == null) {
|
||||
values.put("SpawnData", new CompoundTag(ImmutableMap.of("id", new StringTag(mobType))));
|
||||
values.put(
|
||||
"SpawnData",
|
||||
new CompoundTag(ImmutableMap.of("entity", new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))))
|
||||
);
|
||||
} else {
|
||||
values.put("SpawnData", new CompoundTag(spawnData.getValue()));
|
||||
}
|
||||
if (spawnPotentials == null) {
|
||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, ImmutableList.of(
|
||||
new CompoundTag(ImmutableMap.of("Weight", new IntTag(1), "Entity",
|
||||
new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))
|
||||
)))));
|
||||
values.put(
|
||||
"SpawnPotentials",
|
||||
new ListTag(
|
||||
CompoundTag.class,
|
||||
ImmutableList.of(new CompoundTag(ImmutableMap.of(
|
||||
"weight",
|
||||
new IntTag(1),
|
||||
"data",
|
||||
new CompoundTag(ImmutableMap.of(
|
||||
"entity",
|
||||
new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))
|
||||
))
|
||||
)))
|
||||
)
|
||||
);
|
||||
} else {
|
||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, spawnPotentials.getValue()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user