Move classes added to net.minecraft.server to paper packages (#8500)
This commit is contained in:
parent
95bd943ca3
commit
b9481cae74
45 changed files with 1389 additions and 1387 deletions
|
@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public Pair<BlockPos, Holder<Structure>> findNearestMapStructure(ServerLevel world, HolderSet<Structure> structures, BlockPos center, int radius, boolean skipReferencedStructures) {
|
||||
+ // Paper start - StructureLocateEvent
|
||||
+ final org.bukkit.World bukkitWorld = world.getWorld();
|
||||
+ final org.bukkit.Location origin = net.minecraft.server.MCUtil.toLocation(world, center);
|
||||
+ final org.bukkit.Location origin = io.papermc.paper.util.MCUtil.toLocation(world, center);
|
||||
+ final var paperRegistry = io.papermc.paper.registry.PaperRegistry.getRegistry(io.papermc.paper.registry.RegistryKey.CONFIGURED_STRUCTURE_REGISTRY);
|
||||
+ final List<io.papermc.paper.world.structure.ConfiguredStructure> configuredStructures = new ArrayList<>();
|
||||
+ paperRegistry.convertToApi(structures, configuredStructures::add, false); // gracefully handle missing api, use tests to check (or exclude)
|
||||
|
@ -91,9 +91,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return null;
|
||||
+ }
|
||||
+ if (event.getResult() != null) {
|
||||
+ return Pair.of(net.minecraft.server.MCUtil.toBlockPosition(event.getResult().position()), paperRegistry.getMinecraftHolder(event.getResult().configuredStructure()));
|
||||
+ return Pair.of(io.papermc.paper.util.MCUtil.toBlockPosition(event.getResult().position()), paperRegistry.getMinecraftHolder(event.getResult().configuredStructure()));
|
||||
+ }
|
||||
+ center = net.minecraft.server.MCUtil.toBlockPosition(event.getOrigin());
|
||||
+ center = io.papermc.paper.util.MCUtil.toBlockPosition(event.getOrigin());
|
||||
+ radius = event.getRadius();
|
||||
+ skipReferencedStructures = event.shouldFindUnexplored();
|
||||
+ structures = HolderSet.direct(paperRegistry::getMinecraftHolder, event.getConfiguredStructures());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue