Mixin function rename (fixing #45)

This commit is contained in:
paulevsGitch 2021-01-05 03:00:13 +03:00
parent c394f5a5f0
commit d6f8123249
2 changed files with 8 additions and 8 deletions

View file

@ -13,14 +13,14 @@ import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
@Mixin(GenerationSettings.class)
public interface GenerationSettingsAccessor {
@Accessor("features")
List<List<Supplier<ConfiguredFeature<?, ?>>>> getFeatures();
List<List<Supplier<ConfiguredFeature<?, ?>>>> beGetFeatures();
@Accessor("features")
void setFeatures(List<List<Supplier<ConfiguredFeature<?, ?>>>> features);
void beSetFeatures(List<List<Supplier<ConfiguredFeature<?, ?>>>> features);
@Accessor("structureFeatures")
List<Supplier<ConfiguredStructureFeature<?, ?>>> getStructures();
List<Supplier<ConfiguredStructureFeature<?, ?>>> beGetStructures();
@Accessor("structureFeatures")
void setStructures(List<Supplier<ConfiguredStructureFeature<?, ?>>> structures);
void beSetStructures(List<Supplier<ConfiguredStructureFeature<?, ?>>> structures);
}

View file

@ -23,8 +23,8 @@ public class FeaturesHelper {
biomeRegistry.forEach((biome) -> {
if (biome.getCategory() == Biome.Category.THEEND && !INJECTED.contains(biome)) {
GenerationSettingsAccessor accessor = (GenerationSettingsAccessor) biome.getGenerationSettings();
List<Supplier<ConfiguredStructureFeature<?, ?>>> structures = Lists.newArrayList(accessor.getStructures());
List<List<Supplier<ConfiguredFeature<?, ?>>>> preFeatures = accessor.getFeatures();
List<Supplier<ConfiguredStructureFeature<?, ?>>> structures = Lists.newArrayList(accessor.beGetStructures());
List<List<Supplier<ConfiguredFeature<?, ?>>>> preFeatures = accessor.beGetFeatures();
List<List<Supplier<ConfiguredFeature<?, ?>>>> features = new ArrayList<List<Supplier<ConfiguredFeature<?, ?>>>>(preFeatures.size());
preFeatures.forEach((list) -> {
features.add(Lists.newArrayList(list));
@ -33,8 +33,8 @@ public class FeaturesHelper {
EndFeatures.registerBiomeFeatures(biomeRegistry.getId(biome), biome, features);
EndStructures.registerBiomeStructures(biomeRegistry.getId(biome), biome, structures);
accessor.setFeatures(features);
accessor.setStructures(structures);
accessor.beSetFeatures(features);
accessor.beSetStructures(structures);
INJECTED.add(biome);
}
});