mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-21 02:38:16 +02:00
make it compile \o/
This commit is contained in:
@@ -30,7 +30,7 @@ public class SpawnerItem extends BlockItem {
|
||||
CompoundTag customData = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag();
|
||||
Optional<String> mobTypeStringOptional = customData.getString("Purpur.mob_type");
|
||||
if (mobTypeStringOptional.isPresent()) {
|
||||
EntityType.byString(mobTypeStringOptional.get()).ifPresent(type -> spawner.getSpawner().setEntityId(type, level, level.random, pos));
|
||||
EntityType.byString(mobTypeStringOptional.get()).ifPresent(type -> spawner.getSpawner().setEntityId(type, level, level.getRandom(), pos));
|
||||
} else if (customData.contains("Purpur.SpawnData")) {
|
||||
customData.getCompound("Purpur.SpawnData")
|
||||
.flatMap(spawnerData -> spawnerData.read("SpawnData", net.minecraft.world.level.SpawnData.CODEC))
|
||||
|
||||
Reference in New Issue
Block a user