diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 115601939c..c7c8a0c511 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ antlr = "4.13.1" fabric-api = "0.110.5+1.21.4" neogradle = "7.0.171" -neoforge-minecraft = "1.21.3" +neoforge-minecraft = "1.21.4" sponge-minecraft = "1.21.3" # https://repo.spongepowered.org/service/rest/repository/browse/maven-public/org/spongepowered/spongeapi/ @@ -92,7 +92,7 @@ fabric-minecraft = "com.mojang:minecraft:1.21.4" fabric-loader = "net.fabricmc:fabric-loader:0.16.9" fabric-permissions-api = "me.lucko:fabric-permissions-api:0.3.1" -neoforge = "net.neoforged:neoforge:21.3.40-beta" +neoforge = "net.neoforged:neoforge:21.4.8-beta" # Mojang-provided libraries, CHECK AGAINST MINECRAFT for versions guava = "com.google.guava:guava:33.3.1-jre!!" diff --git a/worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeWorld.java b/worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeWorld.java index 5d5e00e731..c16ea301e3 100644 --- a/worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeWorld.java +++ b/worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeWorld.java @@ -66,6 +66,7 @@ import net.minecraft.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; +import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.features.EndFeatures; @@ -477,7 +478,8 @@ public boolean generateFeature(ConfiguredFeatureType type, EditSession editSessi @Override public boolean generateStructure(StructureType type, EditSession editSession, BlockVector3 position) { ServerLevel world = getWorld(); - Structure k = world.registryAccess().lookupOrThrow(Registries.STRUCTURE).getValue(ResourceLocation.tryParse(type.id())); + Registry structureRegistry = world.registryAccess().lookupOrThrow(Registries.STRUCTURE); + Structure k = structureRegistry.getValue(ResourceLocation.tryParse(type.id())); if (k == null) { return false; } @@ -485,7 +487,7 @@ public boolean generateStructure(StructureType type, EditSession editSession, Bl ServerChunkCache chunkManager = world.getChunkSource(); WorldGenLevel proxyLevel = NeoForgeServerLevelDelegateProxy.newInstance(editSession, world); ChunkPos chunkPos = new ChunkPos(new BlockPos(position.x(), position.y(), position.z())); - StructureStart structureStart = k.generate(world.registryAccess(), chunkManager.getGenerator(), chunkManager.getGenerator().getBiomeSource(), chunkManager.randomState(), world.getStructureManager(), world.getSeed(), chunkPos, 0, proxyLevel, biome -> true); + StructureStart structureStart = k.generate(structureRegistry.wrapAsHolder(k), world.dimension(), world.registryAccess(), chunkManager.getGenerator(), chunkManager.getGenerator().getBiomeSource(), chunkManager.randomState(), world.getStructureManager(), world.getSeed(), chunkPos, 0, proxyLevel, biome -> true); if (!structureStart.isValid()) { return false;