diff options
author | Bjarne Koll <[email protected]> | 2024-10-25 14:55:49 +0200 |
---|---|---|
committer | Bjarne Koll <[email protected]> | 2024-10-25 15:15:12 +0200 |
commit | 918ca965d919fc3ed4d11e09317b1dd91be774ff (patch) | |
tree | c848fd8207f7d12d80eda67d492ab735863b7c8b /patches/server/0468-Add-StructuresLocateEvent.patch | |
parent | 6fb86bb20a492c5a4f786eb03475940a007199a9 (diff) | |
download | Paper-918ca965d919fc3ed4d11e09317b1dd91be774ff.tar.gz Paper-918ca965d919fc3ed4d11e09317b1dd91be774ff.zip |
Compiler issues v3
Diffstat (limited to 'patches/server/0468-Add-StructuresLocateEvent.patch')
-rw-r--r-- | patches/server/0468-Add-StructuresLocateEvent.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0468-Add-StructuresLocateEvent.patch b/patches/server/0468-Add-StructuresLocateEvent.patch index 5312adefad..5556e96212 100644 --- a/patches/server/0468-Add-StructuresLocateEvent.patch +++ b/patches/server/0468-Add-StructuresLocateEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add StructuresLocateEvent Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index 115deba41ec48143570489e8494785a3a48cd789..fd2dd6d25b8d6f3066c60a7f30a58a72cb418b85 100644 +index 115deba41ec48143570489e8494785a3a48cd789..e3c5a49611d584fbd19a44da5aa78ff6d7c43881 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -126,6 +126,24 @@ public abstract class ChunkGenerator { @@ -23,12 +23,12 @@ index 115deba41ec48143570489e8494785a3a48cd789..fd2dd6d25b8d6f3066c60a7f30a58a72 + return null; + } + if (event.getResult() != null) { -+ return Pair.of(io.papermc.paper.util.MCUtil.toBlockPos(event.getResult().pos()), world.registryAccess().registryOrThrow(Registries.STRUCTURE).wrapAsHolder(org.bukkit.craftbukkit.generator.structure.CraftStructure.bukkitToMinecraft(event.getResult().structure()))); ++ return Pair.of(io.papermc.paper.util.MCUtil.toBlockPos(event.getResult().pos()), world.registryAccess().lookupOrThrow(Registries.STRUCTURE).wrapAsHolder(org.bukkit.craftbukkit.generator.structure.CraftStructure.bukkitToMinecraft(event.getResult().structure()))); + } + center = io.papermc.paper.util.MCUtil.toBlockPosition(event.getOrigin()); + radius = event.getRadius(); + skipReferencedStructures = event.shouldFindUnexplored(); -+ structures = HolderSet.direct(api -> world.registryAccess().registryOrThrow(Registries.STRUCTURE).wrapAsHolder(org.bukkit.craftbukkit.generator.structure.CraftStructure.bukkitToMinecraft(api)), event.getStructures()); ++ structures = HolderSet.direct(api -> world.registryAccess().lookupOrThrow(Registries.STRUCTURE).wrapAsHolder(org.bukkit.craftbukkit.generator.structure.CraftStructure.bukkitToMinecraft(api)), event.getStructures()); + } + // Paper end ChunkGeneratorStructureState chunkgeneratorstructurestate = world.getChunkSource().getGeneratorState(); |