diff --git a/src/main/java/me/desht/pneumaticcraft/common/worldgen/OilLakeFilter.java b/src/main/java/me/desht/pneumaticcraft/common/worldgen/OilLakeFilter.java index bf6e2b391..cfd132fac 100644 --- a/src/main/java/me/desht/pneumaticcraft/common/worldgen/OilLakeFilter.java +++ b/src/main/java/me/desht/pneumaticcraft/common/worldgen/OilLakeFilter.java @@ -5,7 +5,6 @@ import me.desht.pneumaticcraft.common.config.ConfigHelper; import me.desht.pneumaticcraft.common.registry.ModPlacementModifierTypes; import me.desht.pneumaticcraft.common.util.WildcardedRLMatcher; -import me.desht.pneumaticcraft.mixin.accessors.WorldGenRegionAccess; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.core.Registry; @@ -41,10 +40,10 @@ protected boolean shouldPlace(PlacementContext context, RandomSource rand, Block // don't allow oil lakes to generate within any structure feature in pneumaticcraft:no_oil_lakes tag if (context.getLevel() instanceof WorldGenRegion region) { SectionPos sectionPos = SectionPos.of(origin); - ChunkAccess chunkAccess = context.getLevel().getChunk(origin); + ChunkAccess chunkAccess = region.getChunk(origin); - Registry reg = context.getLevel().registryAccess().registryOrThrow(Registries.STRUCTURE); - StructureManager sfManager = ((WorldGenRegionAccess)region).getStructureManager(); + Registry reg = region.registryAccess().registryOrThrow(Registries.STRUCTURE); + StructureManager sfManager = region.getLevel().structureManager().forWorldGenRegion(region); for (Holder structureHolder : reg.getOrCreateTag(PneumaticCraftTags.Structures.NO_OIL_LAKES)) { StructureStart startForFeature = sfManager.getStartForStructure(sectionPos, structureHolder.value(), chunkAccess); diff --git a/src/main/java/me/desht/pneumaticcraft/mixin/accessors/WorldGenRegionAccess.java b/src/main/java/me/desht/pneumaticcraft/mixin/accessors/WorldGenRegionAccess.java deleted file mode 100644 index fd86ac03c..000000000 --- a/src/main/java/me/desht/pneumaticcraft/mixin/accessors/WorldGenRegionAccess.java +++ /dev/null @@ -1,12 +0,0 @@ -package me.desht.pneumaticcraft.mixin.accessors; - -import net.minecraft.server.level.WorldGenRegion; -import net.minecraft.world.level.StructureManager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(WorldGenRegion.class) -public interface WorldGenRegionAccess { - @Accessor - StructureManager getStructureManager(); -} diff --git a/src/main/resources/mixins.pneumaticcraft.json b/src/main/resources/mixins.pneumaticcraft.json index aff679fed..7b9fd87b3 100644 --- a/src/main/resources/mixins.pneumaticcraft.json +++ b/src/main/resources/mixins.pneumaticcraft.json @@ -20,7 +20,6 @@ "accessors.ShulkerAccess", "accessors.StructureTemplatePoolAccess", "accessors.WitchAccess", - "accessors.WorldGenRegionAccess", "coremods.BaseSpawnerMixin", "coremods.LivingEntityMixin" ],