diff --git a/paper-server/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch b/paper-server/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch index 28b0aff2fd..33a33996ac 100644 --- a/paper-server/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch +++ b/paper-server/nms-patches/net/minecraft/world/level/chunk/ChunkGenerator.patch @@ -67,7 +67,7 @@ if (structurestart.isValid()) { + // CraftBukkit start + StructureBoundingBox box = structurestart.getBoundingBox(); -+ org.bukkit.event.world.AsyncStructureSpawnEvent event = new org.bukkit.event.world.AsyncStructureSpawnEvent(structuremanager.level.getMinecraftWorld().getWorld(), org.bukkit.craftbukkit.generator.strucutre.CraftStructure.minecraftToBukkit(structure, iregistrycustom), new org.bukkit.util.BoundingBox(box.minX(), box.minY(), box.minZ(), box.maxX(), box.maxY(), box.maxZ()), chunkcoordintpair.x, chunkcoordintpair.z); ++ org.bukkit.event.world.AsyncStructureSpawnEvent event = new org.bukkit.event.world.AsyncStructureSpawnEvent(structuremanager.level.getMinecraftWorld().getWorld(), org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(structure, iregistrycustom), new org.bukkit.util.BoundingBox(box.minX(), box.minY(), box.minZ(), box.maxX(), box.maxY(), box.maxZ()), chunkcoordintpair.x, chunkcoordintpair.z); + org.bukkit.Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return true; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java index 8a0fad6bb8..d2e6a12549 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java @@ -12,8 +12,8 @@ import net.minecraft.core.registries.Registries; import org.bukkit.Keyed; import org.bukkit.NamespacedKey; import org.bukkit.Registry; -import org.bukkit.craftbukkit.generator.strucutre.CraftStructure; -import org.bukkit.craftbukkit.generator.strucutre.CraftStructureType; +import org.bukkit.craftbukkit.generator.structure.CraftStructure; +import org.bukkit.craftbukkit.generator.structure.CraftStructureType; import org.bukkit.craftbukkit.inventory.trim.CraftTrimMaterial; import org.bukkit.craftbukkit.inventory.trim.CraftTrimPattern; import org.bukkit.craftbukkit.util.CraftNamespacedKey; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 3f2dd5172a..4daf60ecef 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -97,7 +97,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.boss.CraftDragonBattle; import org.bukkit.craftbukkit.entity.CraftEntity; import org.bukkit.craftbukkit.entity.CraftPlayer; -import org.bukkit.craftbukkit.generator.strucutre.CraftStructure; +import org.bukkit.craftbukkit.generator.structure.CraftStructure; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.craftbukkit.metadata.BlockMetadataStore; import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java similarity index 97% rename from paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructure.java rename to paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java index 0d45002eff..9ee00be527 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructure.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java @@ -1,4 +1,4 @@ -package org.bukkit.craftbukkit.generator.strucutre; +package org.bukkit.craftbukkit.generator.structure; import net.minecraft.core.IRegistryCustom; import net.minecraft.core.registries.Registries; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructureType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java similarity index 96% rename from paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructureType.java rename to paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java index 494919a8d6..540fce5e34 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/strucutre/CraftStructureType.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java @@ -1,4 +1,4 @@ -package org.bukkit.craftbukkit.generator.strucutre; +package org.bukkit.craftbukkit.generator.structure; import net.minecraft.core.registries.BuiltInRegistries; import org.bukkit.NamespacedKey;