mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
This commit is contained in:
parent
a1051ff388
commit
ebdde69c39
1 changed files with 10 additions and 0 deletions
|
@ -598,6 +598,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|||
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getValue(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
||||
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.bukkit.NamespacedKey getBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z) {
|
||||
return accessor.getBiome(x, y, z).getKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z, org.bukkit.NamespacedKey biomeKey) {
|
||||
accessor.setBiome(x, y, z, org.bukkit.Registry.BIOME.getOrThrow(biomeKey));
|
||||
}
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue