Fixed some ToDo's

This commit is contained in:
Frank 2022-12-02 22:42:31 +01:00
parent 561fc130a3
commit de858beff5
4 changed files with 1 additions and 52 deletions

View file

@ -117,11 +117,10 @@ public class BiomePicker {
all.put(bclBiome, this); all.put(bclBiome, this);
this.bclBiome = bclBiome; this.bclBiome = bclBiome;
//TODO: 1.19.3 is it ok to build the key?
this.key = ResourceKey.create( this.key = ResourceKey.create(
Registries.BIOME, Registries.BIOME,
bclBiome.getID() bclBiome.getID()
);//biomeRegistry.getResourceKey(biomeRegistry.get(bclBiome.getID())).orElse(null); );
this.biome = (key != null && biomeRegistry != null) ? biomeRegistry.getOrThrow(key) : null; this.biome = (key != null && biomeRegistry != null) ? biomeRegistry.getOrThrow(key) : null;
this.isValid = key != null && biome != null && biome.isBound() && biomeRegistry.get(key).isPresent(); this.isValid = key != null && biome != null && biome.isBound() && biomeRegistry.get(key).isPresent();
bclBiome.forEachSubBiome((b, w) -> { bclBiome.forEachSubBiome((b, w) -> {

View file

@ -237,7 +237,6 @@ public class BiomeAPI {
HolderGetter<Biome> registryOrNull = bootstrapContext.lookup(Registries.BIOME); HolderGetter<Biome> registryOrNull = bootstrapContext.lookup(Registries.BIOME);
if (registryOrNull != null if (registryOrNull != null
&& bclbiome._hasBiomeToRegister() && bclbiome._hasBiomeToRegister()
//TODO: 1.19.3 this was a ResourceLocation lookup, is this a valid test?
&& registryOrNull.get(bclbiome.getBiomeKey()).map(v -> v.isBound()).orElse(false) == false) { && registryOrNull.get(bclbiome.getBiomeKey()).map(v -> v.isBound()).orElse(false) == false) {
bootstrapContext.register(bclbiome.getBiomeKey(), bclbiome._getBiomeToRegister()); bootstrapContext.register(bclbiome.getBiomeKey(), bclbiome._getBiomeToRegister());

View file

@ -938,33 +938,6 @@ public abstract class BCLFeatureBuilder<F extends Feature<FC>, FC extends Featur
public SimpleBlockConfiguration createConfiguration() { public SimpleBlockConfiguration createConfiguration() {
return new SimpleBlockConfiguration(new WeightedStateProvider(stateBuilder.build())); return new SimpleBlockConfiguration(new WeightedStateProvider(stateBuilder.build()));
} }
//TODO: Remove in the next Minor Update. This method is just for backward compatibility.
@Override
public WeightedBlock add(Block block, int weight) {
return super.add(block, weight);
}
//TODO: Remove in the next Minor Update. This method is just for backward compatibility.
@Override
public WeightedBlock add(BlockState state, int weight) {
return super.add(state, weight);
}
//TODO: Remove in the next Minor Update. This method is just for backward compatibility.
@Override
public WeightedBlock addAllStates(Block block, int weight) {
return super.addAllStates(block, weight);
}
//TODO: Remove in the next Minor Update. This method is just for backward compatibility.
@Override
public WeightedBlock addAllStatesFor(IntegerProperty prop, Block block, int weight) {
return super.addAllStatesFor(prop, block, weight);
}
} }

View file

@ -1,22 +0,0 @@
package org.betterx.bclib.mixin.common;
import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(NoiseGeneratorSettings.class)
public abstract class NoiseGeneratorSettingsMixin {
;
//TODO:1.19.3 Replaced by Datagen pack file in NoiseDatagen
// @Inject(method = "bootstrap", at = @At("HEAD"))
// private static void bcl_addNoiseGenerators(
// BootstapContext<NoiseGeneratorSettings> bootstapContext, CallbackInfo ci
// ) {
// bootstapContext.register(
// BCLChunkGenerator.AMPLIFIED_NETHER,
// BCLChunkGenerator.amplifiedNether(bootstapContext)
// );
// }
}