mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 21:22:05 -07:00
More compile fixes
This commit is contained in:
@@ -15,7 +15,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - structure check API
|
||||
+ @Override
|
||||
+ public boolean hasStructureAt(final io.papermc.paper.math.Position position, final Structure structure) {
|
||||
+ return this.world.structureManager().getStructureWithPieceAt(io.papermc.paper.util.MCUtil.toBlockPos(position), net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.STRUCTURE, CraftNamespacedKey.toMinecraft(structure.getKey()))).isValid();
|
||||
+ net.minecraft.world.level.levelgen.structure.Structure vanillaStructure = this.world.registryAccess()
|
||||
+ .registryOrThrow(net.minecraft.core.registries.Registries.STRUCTURE)
|
||||
+ .getHolder(CraftNamespacedKey.toMinecraft(structure.getStructureType().getKey()))
|
||||
+ .orElseThrow()
|
||||
+ .value();
|
||||
+ return this.world.structureManager().getStructureWithPieceAt(
|
||||
+ io.papermc.paper.util.MCUtil.toBlockPos(position),
|
||||
+ vanillaStructure
|
||||
+ ).isValid();
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
|
Reference in New Issue
Block a user