BYG crash fix, BYG end sub-biome support, Old Bulbis Gardens

improvements
This commit is contained in:
paulevsGitch 2021-02-09 15:06:08 +03:00
parent 7ef23332fc
commit 38a09c7221
10 changed files with 183 additions and 53 deletions

View file

@ -9,6 +9,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.biome.Biome;
import ru.betterend.config.Configs;
import ru.betterend.util.JsonFactory;
@ -161,10 +162,6 @@ public class EndBiome {
return structuresFeature;
}
public void setActualBiome(Biome biome) {
this.actualBiome = biome;
}
public Biome getActualBiome() {
return this.actualBiome;
}
@ -180,4 +177,34 @@ public class EndBiome {
public boolean hasCaves() {
return hasCaves;
}
public void updateActualBiomes(Registry<Biome> biomeRegistry) {
subbiomes.forEach((sub) -> {
sub.updateActualBiomes(biomeRegistry);
});
if (edge != null) {
edge.updateActualBiomes(biomeRegistry);
}
Biome biome = biomeRegistry.get(mcID);
this.actualBiome = biome;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
EndBiome biome = (EndBiome) obj;
return biome == null ? false : biome.mcID.equals(mcID);
}
@Override
public int hashCode() {
return mcID.hashCode();
}
public List<EndBiome> subbiomes() {
// TODO Auto-generated method stub
return this.subbiomes;
}
}