Closed Mitality closed 7 months ago
Would be even better, if you would allow us to disable seasonal colors only for custiom biomes, but this is not necessary, as we could use an additional configuration-file for custom biomes instead
I saw this the day you posted, and still trying to think of how to do this - but it might not be possible right now. I'll keep this open until some idea pops up!
Isn't colors the only thing the biome change does..? I mean everything else should be doable by just using the original biome how it is, or not..? What would break?
How about an option to not replace (custom) biomes and just calculate / do everything with the original biome from the config..?
Even a setting to disable the custom advanced biomes and use the default vanills/customworldgen ones without color changes would be something
@GC-spigot
It’s easier said than done. To add this we have to rework like 30% of the plugin. It’s currently not the highest priority as the people who will use it are handful, the plugin functions well, and we’ll get to this after other bigger updates, e.g. For customisable temperature of blocks etc.
We always prioritize issues and features that would be most widely impactful.
Hmm well then the only option left for me by now is to give moonlight grove and mirage isles their own biome group... How many biome groups can I define before it exceeds the vanilla biome limit..? (Note that terralith adds about 75 biomes or so on top of the 64 from vanilla)
Or could you please use the temperature-formular even for biomes that are not in the config / add a setting to do so, instead of just using the base value no matter what season there is? Just use 0 as %biome% temperature if the biome isn't found
I just need a way to use the temperature system without letting AS obliterate custom biomes
Or could you please use the temperature-formular even for biomes that are not in the config / add a setting to do so, instead of just using the base value no matter what season there is? Just use 0 as %biome% temperature if the biome isn't found
Or even better, let me set biome-temperature-overrides within temperature.yml to be used within the temperature-formula, no matter if the biome is configured there.
Something like this could be manually added to temperature.yml:
biomeTemperatureOverrides:
FROZEN_OCEAN: -6
mirage_isles: 3
As I don't really care about the snow, this should make AS usable for me without coming close to having to rework 30% of the plugin.
@GC-spigot
This way, I could just clear the biomeConfiguration folder and everything but the snow and abviously seasonal colors should work for now, right?
Just noticed that clearing the biomeConfiguration folder lets it regenerate, but if I set biomes: to [ ], it should work, right?
Yes if you set biomes to []
it would still work
Great! Only biome temperature overrides are needed then to make this fully work
Should I add them as a separate issue?
If you are still wondering why this option is so essential to me: I just can't use AS when it obliterates the visuals of my worlds like that
Or could you please use the temperature-formular even for biomes that are not in the config / add a setting to do so, instead of just using the base value no matter what season there is? Just use 0 as %biome% temperature if the biome isn't found
Or even better, let me set biome-temperature-overrides within temperature.yml to be used within the temperature-formula, no matter if the biome is configured there.
Something like this could be manually added to temperature.yml:
biomeTemperatureOverrides: FROZEN_OCEAN: -6 mirage_isles: 3
As I don't really care about the snow, this should make AS usable for me without coming close to having to rework 30% of the plugin.
@GC-spigot
How about adding something like this to net.advancedplugins.seasons.biomes.BiomesHandler.getPlayerTemperature/getLocationTemperature?
public int getPlayerTemperature(Player paramPlayer) {
int i;
Location location = paramPlayer.getEyeLocation();
if (this.temp.containsKey(paramPlayer.getUniqueId()))
return ((Integer) this.temp.get(paramPlayer.getUniqueId())).intValue();
Biome biome = location.getBlock().getBiome();
SeasonType seasonType = Core.getSeasonHandler().getSeason(paramPlayer.getWorld()).getType();
AdvancedBiomeBase advancedBiomeBase = Core.getBiomesHandler().getBiome(biome);
if (advancedBiomeBase == null) {
i = 0;
} else {
i = advancedBiomeBase.getTemperature();
}
/* NEW CODE START */
File file = new File(<get-plugin-from-somewhere>.getDataFolder(), "temperature.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(file);
ConfigurationSection biomeOverridesSection = yamlConfiguration.getConfigurationSection("biomeTemperatureOverrides");
if (biomeOverridesSection != null && biomeOverridesSection.contains(biome.name())) {
i = biomeOverridesSection.getInt(biome.name());
}
/* NEW CODE END */
double d = location.getBlock().getLightFromBlocks();
int j = getSeasonTemperature(seasonType, advancedBiomeBase);
int k = (int) (d * (seasonType.equals(SeasonType.SUMMER) ? 0.8D : Math.max(1.5D, d / ((j < 0) ? 5 : 8))));
int m = (int) Arrays.<ItemStack>stream(paramPlayer.getInventory().getArmorContents()).filter(Objects::nonNull).count();
int n = getConditional(paramPlayer);
return (int) ASManager.parseThroughCalculator(this.formula.replace("%base%", Integer.toString(this.baseTemperature)).replace("%biome%", Integer.toString(i)).replace("%seasonTemp%", Integer.toString(j)).replace("%lightLevel%", Integer.toString(k)).replace("%conditionalTemp%", Integer.toString(n)).replace("%armorItemsCount%", Integer.toString(m)));
}
public int getLocationTemperature(Location paramLocation) {
int i;
Biome biome = paramLocation.getBlock().getBiome();
SeasonType seasonType = Core.getSeasonHandler().getSeason(paramLocation.getWorld()).getType();
AdvancedBiomeBase advancedBiomeBase = Core.getBiomesHandler().getBiome(biome);
if (advancedBiomeBase == null) {
i = 0;
} else {
i = advancedBiomeBase.getTemperature();
}
/* NEW CODE START */
File file = new File(<get-plugin-from-somewhere>.getDataFolder(), "temperature.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(file);
ConfigurationSection biomeOverridesSection = yamlConfiguration.getConfigurationSection("biomeTemperatureOverrides");
if (biomeOverridesSection != null && biomeOverridesSection.contains(biome.name())) {
i = biomeOverridesSection.getInt(biome.name());
}
/* NEW CODE END */
double d = paramLocation.getBlock().getLightFromBlocks();
int j = getSeasonTemperature(seasonType, advancedBiomeBase);
int k = (int) (d * (seasonType.equals(SeasonType.SUMMER) ? 1.0D : Math.max(1.5D, d / ((j < 0) ? 5 : 8))));
return (int) ASManager.parseThroughCalculator(this.formula.replace("%base%", Integer.toString(this.baseTemperature)).replace("%biome%", Integer.toString(i)).replace("%seasonTemp%", Integer.toString(j)).replace("%lightLevel%", Integer.toString(k)).replace("%conditionalTemp%", "0").replace("%armorItemsCount%", "0"));
}
(Just trying to make it easier for you. If you don't want me to mess around with your code, let me know) 🙂
(Actually, I have no idea if this works with custom biomes, but you'll know for sure)
Added
Describe the feature
Could even look like this: