Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
fix: correct NBT for spawners (#2362)
Dieser Commit ist enthalten in:
Ursprung
5167073326
Commit
cdd546ee5e
@ -134,15 +134,29 @@ public class MobSpawnerBlock extends BaseBlock {
|
|||||||
values.put("MaxNearbyEntities", new ShortTag(maxNearbyEntities));
|
values.put("MaxNearbyEntities", new ShortTag(maxNearbyEntities));
|
||||||
values.put("RequiredPlayerRange", new ShortTag(requiredPlayerRange));
|
values.put("RequiredPlayerRange", new ShortTag(requiredPlayerRange));
|
||||||
if (spawnData == null) {
|
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 {
|
} else {
|
||||||
values.put("SpawnData", new CompoundTag(spawnData.getValue()));
|
values.put("SpawnData", new CompoundTag(spawnData.getValue()));
|
||||||
}
|
}
|
||||||
if (spawnPotentials == null) {
|
if (spawnPotentials == null) {
|
||||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, ImmutableList.of(
|
values.put(
|
||||||
new CompoundTag(ImmutableMap.of("Weight", new IntTag(1), "Entity",
|
"SpawnPotentials",
|
||||||
new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))
|
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 {
|
} else {
|
||||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, spawnPotentials.getValue()));
|
values.put("SpawnPotentials", new ListTag(CompoundTag.class, spawnPotentials.getValue()));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren