Partial API calls fixes

This commit is contained in:
paulevsGitch 2021-12-05 05:51:51 +03:00
parent 6671b43cac
commit 2367b5d5be
9 changed files with 20 additions and 62 deletions

View file

@ -15,61 +15,17 @@ public class BYGIntegration extends ModIntegration implements EndBiomeIntegratio
@Override
public void init() {
Block block = Integrations.BYG.getBlock("ivis_phylium");
/*Block block = Integrations.BYG.getBlock("ivis_phylium");
if (block != null) {
TagAPI.addTags(block, TagAPI.BLOCK_END_GROUND, TagAPI.BLOCK_GEN_TERRAIN);
}
BYGBlocks.register();
BYGFeatures.register();
BYGBiomes.register();
BYGBiomes.register();*/
}
@Override
public void addBiomes() {
BYGBiomes.addBiomes();
//Class<?> biomeClass = this.getClass("corgiaoc.byg.common.world.biome.BYGEndBiome");
//List<Object> biomes = this.getStaticFieldValue(biomeClass, "BYG_END_BIOMES");
/*if (biomes != null && biomeClass != null) {
biomes.forEach((obj) -> {
Biome biome = this.getAndExecuteRuntime(biomeClass, obj, "getBiome");
if (biome != null) {
ResourceLocation biomeID = BuiltinRegistries.BIOME.getKey(biome);
BCLBiome endBiome = BiomeAPI.getBiome(biomeID);
Biome edge = this.getAndExecuteRuntime(biomeClass, obj, "getEdge");
if (edge != null) {
ResourceLocation edgeID = BuiltinRegistries.BIOME.getKey(edge);
EndBiomes.LAND_BIOMES.removeMutableBiome(edgeID);
EndBiomes.VOID_BIOMES.removeMutableBiome(edgeID);
BCLBiome edgeBiome = BiomeAPI.getBiome(edgeID);
endBiome.setEdge(edgeBiome);
}
else {
Boolean isVoid = this.getAndExecuteRuntime(biomeClass, obj, "isVoid");
if (isVoid != null && isVoid.booleanValue()) {
EndBiomes.LAND_BIOMES.removeMutableBiome(biomeID);
EndBiomes.VOID_BIOMES.addBiomeMutable(endBiome);
}
ShufflingList<ResourceLocation> subBiomes = this.getAndExecuteRuntime(
biomeClass,
obj,
"getHills"
);
if (subBiomes != null) {
subBiomes.stream().collect(Collectors.toList()).forEach((id) -> {
BCLBiome subBiome = BiomeAPI.getBiome(id);
EndBiomes.LAND_BIOMES.removeMutableBiome(id);
EndBiomes.VOID_BIOMES.removeMutableBiome(id);
if (!endBiome.containsSubBiome(subBiome)) {
EndBiomes.SUBBIOMES.add(subBiome);
endBiome.addSubBiome(subBiome);
}
});
}
}
}
});
}*/
//BYGBiomes.addBiomes();
}
}