1.18.2-pre

This commit is contained in:
gnembon committed 2022-02-20 01:50:46 +01:00
1 parent 702022bce0
commit c01ad9ce9d
20 files changed
+303 -422

No files matched your search

@@ -1,25 +1,30 @@
package carpet.mixins;
import carpet.fakes.ChunkGeneratorInterface;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.core.Holder;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
import net.minecraft.world.level.levelgen.structure.placement.StructurePlacement;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import java.util.List;
@Mixin(ChunkGenerator.class)
public abstract class ChunkGenerator_scarpetMixin implements ChunkGeneratorInterface
{
//@Shadow protected abstract void generateStrongholds(); // postInit
//@Shadow private static boolean validStrongholdBiome(Biome biome) { return true;}
@Shadow protected abstract void ensureGenerated();
// @Override
//public void initStrongholds()
//{
// generateStrongholds();
//}
@Shadow protected abstract List<StructurePlacement> getPlacementsForFeature(Holder<ConfiguredStructureFeature<?, ?>> holder);
//@Override
//public boolean canPlaceStrongholdInBiomeCM(Biome biome) {
// return validStrongholdBiome(biome);
//}
@Override
public void initStrongholds()
{
ensureGenerated();
}
@Override
public List<StructurePlacement> getPlacementsForFeatureCM(ConfiguredStructureFeature<?, ?> structure) {
return getPlacementsForFeature(Holder.direct(structure));
}
}