More compile fixes
This commit is contained in:
parent
ca25aa1859
commit
686f224893
5 changed files with 14 additions and 325 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue