Continue migration
This commit is contained in:
parent
47ed597358
commit
33dbfbe633
263 changed files with 1450 additions and 1486 deletions
|
@ -11,28 +11,29 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import net.fabricmc.fabric.impl.biome.InternalBiomeData;
|
||||
import net.fabricmc.fabric.impl.biome.WeightedBiomePicker;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeKeys;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
import ru.betterend.interfaces.IBiomeList;
|
||||
|
||||
@Mixin(value = WeightedBiomePicker.class, remap = false)
|
||||
public class WeightedBiomePickerMixin implements IBiomeList {
|
||||
private List<RegistryKey<Biome>> biomes = Lists.newArrayList();
|
||||
|
||||
private List<ResourceKey<Biome>> biomes = Lists.newArrayList();
|
||||
|
||||
@Inject(method = "addBiome", at = @At("TAIL"))
|
||||
private void be_addBiome(final RegistryKey<Biome> biome, final double weight, CallbackInfo info) {
|
||||
private void be_addBiome(final ResourceKey<Biome> biome, final double weight, CallbackInfo info) {
|
||||
if (be_isCorrectPicker((WeightedBiomePicker) (Object) this)) {
|
||||
biomes.add(biome);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<RegistryKey<Biome>> getBiomes() {
|
||||
public List<ResourceKey<Biome>> getBiomes() {
|
||||
return biomes;
|
||||
}
|
||||
|
||||
|
||||
private boolean be_isCorrectPicker(WeightedBiomePicker picker) {
|
||||
return picker == InternalBiomeData.getEndBiomesMap().get(BiomeKeys.SMALL_END_ISLANDS) || picker == InternalBiomeData.getEndBarrensMap().get(BiomeKeys.END_BARRENS);
|
||||
return picker == InternalBiomeData.getEndBiomesMap().get(Biomes.SMALL_END_ISLANDS)
|
||||
|| picker == InternalBiomeData.getEndBarrensMap().get(Biomes.END_BARRENS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue