Giter VIP home page Giter VIP logo

globalwarming's Introduction

GlobalWarming- - Supports Minecraft 1.14+

Minecraft Server Java Edition (Spigot) plugin which adds game-changing climate change mechanics.

Table of Contents

Contributing

  • Developer Setup
  • There is a Kanban board on Github where I'll be prioritizing work, feel free to help work on any of the tasks.
  • Pull requests welcome! This is a very new project and I appreciate contributions.

Install

  • Download and install mysql: https://dev.mysql.com/downloads/mysql/
    • Setup a user that can create tables.
    • Add a schema called GlobalWarming (if your mysql is configured to only allow lowercase schemas, globalwarming with lowercase works, you just have to change that config in config.yaml below)
  • Setup and install BuildTools with it's Prerequisites (java and git): https://www.spigotmc.org/wiki/buildtools/
  • Setup a Spigot server using these instructions: https://www.spigotmc.org/wiki/spigot-installation/
    • Copy the spigot.jar for the build tools install to a new directory with the batch script from the Spigot server install, making sure to edit the batch script with the amount of Ram for the server and the correct file name
  • Run the server batch script to get all of the folders created
  • Copy GlobalWarming.jar into the plugins folder in your server directory
  • Run the server again now that you have the plugin. This will create a GlobalWarming folder in the plugins folder.
  • Edit config.yaml in the GlobalWarming folder to specify your mysql db username and password.
  • You should be able to run the server with the GlobalWarming plugin successfully now and connect to your server from the Minecraft Game.

Overview

  • Adds the concept of greenhouse gases (CO2) in the worlds atmosphere
  • Furnaces emit CO2 when players smelt items
  • Farmed Animals emit CH4 when they are killed
  • Trees (instantly) absorb CO2 when they grow from a sapling
  • As CO2 levels rise, global temperature rises because of the Greenhouse Effect

Purpose

  • Ever had the hankering to turn a game meant for fun into an emulator of one of the modern world's toughest challenges?
  • Observe the Prisoner's Dilemma first hand!
  • Players are best off when they co-operate and agree to reduce their emissions
  • However, each player typically believes they are better off for themselves to emit as much as they wish.
  • Avoiding a Tragedy of the Commons might be fun! If the players don't play nice and end up dealing with the consequences, they might decide to agree to fix the planet.

Mechanics

  • Every furnace burn causes a "Contribution" to emissions with an associated numerical value (based on the model)
  • Every tree growth causes a "Reduction" from emissions with an associated numerical value (based on the model)
  • The global temperature is a function of the net global carbon score.
  • As the global temperature rises, the frequency and severity of negative climate damages increases.
  • Players can purchase "carbon offsets" which creates a tree-planting bounty for other players to fulfill.

Challenges

  • Designing a default model that doesn't quickly destroy worlds
  • Efficiently applying in-game mechanics changes

Features

  • Scoreboard Integration - Players can compete for carbon neutrality! The worst polluters can be shamed.
  • Economy Integration - Set up tree-planting bounties
  • Carbon Scorecard - Each player can see their latest carbon footprint trends via the command line.
  • Multi-world - Associate emissions in the end or nether worlds to the primary overworld with ease.
  • Custom Models - The inner numerical workings are as configurable as possible. Set thresholds, probabilities, and distributions.
  • Database storage - Load data on startup, queue DB changes to be done async and at intervals (instead of as they happen, that'd kill performance), and empty queue on shutdown.
  • Highly configurable - Almost everything will have some degree of configuration to suit your server's needs.
  • Efficient - Despite major mechanics changes and an extensive event listening setup, GlobalWarming is fast.

Negative Climate Damages (Sample Model)

Higher temps inherit the damages from the lower temps

Global Temp Effect 1 Effect 2 Effect 3 Effect 4
14.0 C None
15.0 C Some mobs spawn less some mobs spawn more
16.0 C +1 Sea level rise Some fish die Ice/Snow stops forming
17.0 C +1 Sea level rise Flora species growth stunted Aquatic life stops spawning Ocean flora/fauna die
18.0 C +1 Sea level rise Area Potion Effect Clouds Farm yields lower Snow/Ice melts
19.0 C +1 Sea level rise Forest Fires Slower Health Regen Frequent T-Storms
20.0 C +1 Sea level rise Severe Forest Fires Violent T-Storms Permanent Slowness Effect

These are just a sample of the possible effects, these will be configurable and implement randomness and probabilities.

Related Science of Climate Change

Atmosphere warms with more CO2 because of Greenhouse Effect

Greenhouse Effect

Atmospheric Energy Budget

  • Earth's Global Energy Budget

Source: RIT "Climate Change: Science, Technology, and Policy" lecture slides

Impact on Oceans

Oceans

Source: RIT "Climate Change: Science, Technology, and Policy" lecture slides

Ecological Niche

Niche

  • Species have a temperature range in which they can survive
  • Plants also have niches (Sunlight, Temperature, Water, Nutrients, CO2, Soil, etc)

Source: RIT "Climate Change: Science, Technology, and Policy" lecture slides

Suggestions

Feel free to create issues on this GitHub project, or join the discord

globalwarming's People

Contributors

0xflotus avatar dariasc avatar georgepadolsey avatar jasonjmcghee avatar jeffb5000 avatar matthewberryman avatar mclifford9 avatar mohansha avatar nickpunt avatar nsporillo avatar shahanas-shaha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

globalwarming's Issues

/GW commands

we recently just installed this plugin on our server but whenever we perform the /gw commands nothing happens? were just wondering if this is a bug or you have to restart the plugin or something.

about papi

I am using your global warming plugin. The plugin is very creative, but I hope this plugin will support papi, allowing me to display the current world temperature through the scoreboard. Although the plugin already comes with a scoreboard, it doesn't work with my own scoreboard, so I hope you can provide a placeholder for this plugin.

Vanished players show on scoreboard

Describe the bug
A vanished player is still shown on the scoreboard to other players.

To Reproduce
Steps to reproduce the behavior:

  1. Enable/show scoreboard
  2. Vanish with any vanish plugin
  3. Look at the scoreboard

Expected behavior
When a player vanishes they should be hidden from the scoreboard.

Screenshots
Screenshot

Add proper temperature reset command

GlobalWarming works by taking the cumulative carbon scores on a per world basis and translating that into a temperature based on the configurable models files.

Right now we support a /gw debug temp <value> command which will manually override the worlds temperature by calculating the score that the desired temperature matches to and setting the worlds score in the database. However, we track a detailed record of player contributions and reductions which are linked to furnace and tree tables.
This means that player scores remain what they are, so scoreboards and GW commands will show scores which do not add up to the current global carbon score.

Ideally we'd have this temperature reset command not destroy the referential integrity of the database. We can probably assume that if one wishes to reset the temperature, then they are okay with erasing all of the player contributions and reductions. The typical suggested workaround for when server owners want to reset their world is to:

  1. Shutdown the server
  2. Manually delete the H2 database files
  3. Restart the server

However if the owner is not using H2 and is instead using MySQL.. this is a more involved process. We want this command to simply purge all relevant tables and reload the internal GlobalWarming storage such that it is fully consistent.

Carbon contributions not tied to furnaces

Currently the plugin bases carbon contributions from furnaces based on who placed the furnace.

A nice upgrade would support tracking contributions based on who put fuel into a furnace which caused a smelt.

Some edge cases to consider are when multiple players add fuel to furnaces, that information must be persisted through restarts because leftover fuel is allowed to stored in furnaces until the next item to be smelted is inserted.

Implement PlaceholderAPI

This is a suggestion to implement PlaceholderAPI into the plugin to allow other scoreboard & chat plugins to access values (such as temperature).

For example,
The Placeholder for global temperature can be %globalwarming_globaltemp%

Sea level will not drop after the temperature drops

Describe the bug
Sea level will not drop after the temperature drops

To Reproduce
Steps to reproduce the behavior:

  1. Let the temperature rise and the sea level rise
  2. Let the temparature drop
  3. The sea level won't drop after the temperature drops.

Expected behavior
The sea level should drop to the base sea level(y=62).

Screenshots
https://s1.ax1x.com/2020/05/09/Y1PGee.png

Additional context
Add any other context about the problem here.

NullPointerException when running /gw from the console

When running one of the plugin commands from the console, a NullPointerException occurs.

To Reproduce

  1. Run /gw in the console
  2. Command fails with an NPE

Expected behavior
Instead of throwing an exception, a message would be sent saying that a player needs to execute the command.

Exception:

[12:35:35 ERROR]: [GlobalWarming] [ACF] Exception in command: gw 
[12:35:35 ERROR]: [GlobalWarming] [ACF] java.lang.NullPointerException
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.GlobalWarming.lambda$registerCommands$1(GlobalWarming.java:122)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.RegisteredCommand.resolveContexts(RegisteredCommand.java:296)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.RegisteredCommand.resolveContexts(RegisteredCommand.java:215)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.RegisteredCommand.invoke(RegisteredCommand.java:149)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.BaseCommand.executeCommand(BaseCommand.java:576)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.BaseCommand.execute(BaseCommand.java:512)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.RootCommand.execute(RootCommand.java:99)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.porillo.shade.aikar.commands.BukkitRootCommand.execute(BukkitRootCommand.java:79)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:734)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchServerCommand(CraftServer.java:696)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.minecraft.server.v1_13_R2.DedicatedServer.handleCommandQueue(DedicatedServer.java:483)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:440)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837)
[12:35:35 ERROR]: [GlobalWarming] [ACF] 	at java.lang.Thread.run(Thread.java:748)

Globalwarming throws an error on load

[07:57:25] [Server thread/INFO]: [GlobalWarming] Enabling GlobalWarming v1.0.1
[07:57:25] [Server thread/INFO]: [GlobalWarming] Lang loaded: [en-US]
[07:57:29] [Server thread/ERROR]: [GlobalWarming] MySQL connection not found.
[07:57:29] [Server thread/ERROR]: [GlobalWarming] Data won't persist after restarts!
[07:57:29] [Server thread/ERROR]: [GlobalWarming] Please update config.yml and restart the server.
[07:57:29] [Server thread/ERROR]: Error occurred while enabling GlobalWarming v1.0.1 (Is it up to date?)
java.lang.NullPointerException: null
at net.porillo.config.WorldConfig.loadKeys(WorldConfig.java:54) ~[?:?]
at net.porillo.config.ConfigLoader.load(ConfigLoader.java:52) ~[?:?]
at net.porillo.config.WorldConfig.(WorldConfig.java:30) ~[?:?]
at net.porillo.engine.ClimateEngine.loadWorldClimateEngines(ClimateEngine.java:37) ~[?:?]
at net.porillo.GlobalWarming.onEnable(GlobalWarming.java:87) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:416) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:458) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:372) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:440) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:258) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:761) [spigot-1.14.1.jar:git-Spigot-8043ebc-9bda413]
at java.lang.Thread.run(Thread.java:834) [?:?]

Simplify setup

Right now a lot of specific knowledge is required in order to try GlobalWarming out:

  • compiling Minecraft plugins / java apps
  • running Minecraft server & sorting out Minecraft versions
  • setting up Spigot
  • installing plugin

Searching for guides is time consuming and piecing everything together is difficult even for technical people not familiar with Minecraft server/plugin ecosystem. This is a big barrier to entry to soliciting feedback and refining the product, especially from folks that may have domain knowledge or would deploy this in an educational setting. Possible ways to simplify this are:

  • easy way to spin up remote server with plugin installed
  • downloadable binaries
  • guide for macos/windows/linux on compiling project
  • guide for macos/windows/linux on setting up Minecraft with appropriate plugins

Heat Wave System

The idea is to implement a system of heat waves.
The heat waves would happen at random predefined intervals once carbon levels reach a certain point becoming worse with each carbon level increase. Heat waves would be informed a few game days in advance, allowing time for players to try and improve the carbon situation before it arrives.

Some things that might happen when these heat waves arrive would be:

  • No Rains

  • Decreased growth speed for most plants

  • Fish would die or become 'ill' (If you fish or kill during a heat wave would make that item give a chance of intoxication, see Red Tide)

  • Some animals might have a chance to die

  • Maybe dolphins would be aggresive towards players or would not provide the Dolphin Effect (Unless this project is targeting below 1.13)

  • Players become hungrier faster

  • Water might have a chance to evaporate on bucket use

  • More ideas could easily be added to this issue in the future

This could be implemented by expanding upon the current model system
(Would love to help out on this)

Thanks

Error on startup

Server Log:
https://pastebin.com/3kyzt7t5

Minecraft server version : Paper 1.14.4

Plugins Im using:
AdvancedAchievements
ClearLag
CoreProtect
Essentials
EssentialsGeoIP
EssentialsXMPP
GlobalWarrming
GriefPreventionData
ItemJoin
MultiVoteListener
NPCAuctions
PermissionsEx
Variables
Vault
Votifier
WorldEdit
WorldGaurd
bstats

[Request] Mod Version

Adding this as a form of mod (for forge) rather than a plugin, this would be very interesting to use in modpacks, making them more challenging and challenging users to balance out progression, as there could be a config for custom blocks (such as coal generators or boilers) to generate carbon dioxide.

Forge for 1.13 is still in development, but a 1.12 backport and maybe 1.13 version as mod would be amazing to see.

Failed to load the plugin

Describe the bug
as the title

To Reproduce
start the server then

Expected behavior
load the plugin

Screenshots
no

Additional context

[14:08:30] [Server thread/ERROR]: Error occurred while enabling GlobalWarming v1.3.1 (Is it up to date?)
com.google.gson.JsonSyntaxException: duplicate key: null
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at com.google.gson.Gson.fromJson(Gson.java:887) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at com.google.gson.Gson.fromJson(Gson.java:852) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at com.google.gson.Gson.fromJson(Gson.java:801) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at net.porillo.engine.models.ReductionModel.loadModel(ReductionModel.java:26) ~[?:?]
        at net.porillo.engine.models.ReductionModel.<init>(ReductionModel.java:21) ~[?:?]
        at net.porillo.engine.api.WorldClimateEngine.<init>(WorldClimateEngine.java:50) ~[?:?]
        at net.porillo.engine.ClimateEngine.loadWorldClimateEngine(ClimateEngine.java:39) ~[?:?]
        at net.porillo.engine.ClimateEngine.loadWorldClimateEngines(ClimateEngine.java:60) ~[?:?]
        at net.porillo.GlobalWarming.onEnable(GlobalWarming.java:101) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:461) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:375) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:449) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:258) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:776) [spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]

Climate Effects for when temperature is too low

Currently we only support neutral or negative climate effects for when temperatures rise too high, but it is possible for the temperature to go below 14.0C when players focus on planting a lot of trees or perhaps when the plugin is installed on a server with an old world where players arent necessarily smelting a lot.

We should consider new climate effects for when the world temperature is too cold! Such as increased ice formation, snow occurring at lower elevations, decreased farm yields, etc.

An inspection of our existing climate effects could certainly give some inspiration for how to implement such changes.

Dams are not feasible

Describe the bug
Dams are not feasible when the sea level rises.

To Reproduce

  1. Let the sea level rise
  2. Water will flood the dam from the inside

Expected behavior
Water will rise from around

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

[Internal] Bukkit class / internal class mismatch

There's an overlap between names of classes such as World/Location and those used by Bukkit. This means the full class name is required.

A solution to this is prefixing all similar spelled classes. For example "G" for global (warming).

An example of the behaviour:
https://github.com/nsporillo/GlobalWarming/blob/master/src/main/java/net/porillo/listeners/WorldListener.java#L20

This is definitely not a big issue though, if sorted, clears up the code a little bit :)

Vanilla scoreboard mechanics

Does this plugin have a score that can be manipulated using vanilla minecraft’s Scoreboard commands? If not I feel like implementing this feature could greatly improve the plugin’s customization options.

Multi-world: no climate engine

Describe the bug
When using multiple worlds, as provided by MultiVerse-Core, the plugin spams that it can not find the climate engine for that world. I've tried to duplicate the files of the default world, renaming them after the new world, but no luck, even after restart.

To Reproduce
Steps to reproduce the behavior:

  1. Run the plugin on the default world
  2. Create a new world with MultiVerse-core
  3. In the console, you see it spamming "[GlobalWarming] Climate engine not found for world: 'test'"

Expected behavior
For the plugin to recognise that it has no configuration for that new world, and creates one for it. While the server runs or on startup.

Screenshots
A screenshot of the warning-message
https://imgur.com/a/nviWV3K
image

Additional context
Using Multiverse-core v4.1.0
Spigot 1.14.4

Livestock

Livestock producing greenhouse gases, primarily Cows and Sheep.
Instead of using total cows and sheep maybe you could check how close they are to various blocks which dont spawn naturally, such as fences, gates, planks etc. Would give the players a chance to not keep to many animals or have a shared livestock?

Carbon effects occuring when carbon footprint is negative in MC 1.15.1 GW 1.2.3

Describe the bug
I'm getting a lot of skeleton horses spawning in place of passive mobs, despite the temperature being at or below 14C. This happens for both mobs found in the wild and farms.

The issue seems to be reproducible simply by breeding pigs until one pops out a skeleton horse.

To Reproduce
Steps to reproduce the behavior:

  1. Keep a negative carbon footprint.
  2. Breed pigs.
  3. One will spawn as a skeleton horse.

Expected behavior
Skeleton horses should not spawn until carbon emissions elevate temperature above the target range of 14C.

Screenshots
2019-12-29_00 43 32

Additional context

I'm running Minecraft 1.15.1 and GW v1.2.3. I'm using default configuration.
I'm using Paper 1.15.1 29 (PaperMC/Paper@9205b75)

Climate effect which negatively impacts coral reefs

This project already supports a climate effect that impacts sea levels, so we can adapt some of the principles to include a new climate effect that negatively impacts coral reefs as temperatures get too high.

This effect could begin scanning loaded chunks once temperatures exceed the configurable threshold and only process chunks whose Biome is one where coral reefs can ever naturally spawn in. See warm oceans.

Ideally this sort of effect would routinely apply some small level of damage to coral reefs at first, but progressively do more damage as the temperature increases. If the temperature is just barely meeting the threshold then we should expect it to take a fairly long time to fully obliterate a coral reef.

Minecraft has block Material for both alive and dead coral, so one aspect of this effect would be to slowly convert living coral to dead coral. We could outright set the block type to the dead variant of coral, or perhaps consider setting the WaterLogged state to false which might induce a more gradual dying process.

Since we're modifying the game mechanics of warm, and deep warm ocean biomes. We can also consider increasing the growth rates of the types of sea grass and kelp which could be consistent with the CO2 fertilization effect.

A lot of fun can be had with implementing a new climate effect like this, lets keep it interesting realistic but most importantly still fun.

entityMethaneModel

Describe the bug
I am editing the models to expand the creatures and materials and to slow down the plugin. While editing the entityMethaneModel, I discovered there seems to be a limit to how far one can go with it and that it's an irregular limit. I have run test after test to determine what the cause is and so far, this is what I can tell you it's not:
Spelling Error,
Missing data,
Improper formatting,
Too many mobs,
too small of numerical input,
1.16 mobs

Things I believe it Could be but am too tired to test any further:
Mob incompatibility (most likely)
A miss-spelled mob within the plugin coding,
too many large named mobs,
oompa loopas (this cannot be tested for.)

To Reproduce
Steps to reproduce the behavior:
use either of the following inputs as your entityMethaneModel and start the server

short:
{ "CREEPER": 0.99, "EVOKER": 1.0, "ILLUSIONER": 1.20, "PILAGER": 1.0, "VINDICATOR": 1.35, "WITCH": 1.45, "ZOMBIE_HORSE": 0.75, "ZOMBIE_VILLAGER": 1.45, "CAT": 0.25, "CHICKEN": 0.25, "COW": 1.05, "DOLPHIN": 1.45, "DONKEY": 0.65, "FOX": 0.13, "HORSE": 0.85, "LLAMA": 0.45, "MULE": 0.75, "MUSHROOM_COW": 0.975, "OCELOT": 0.35, "POLAR_BEAR": 0.95, "PANDA": 0.85, "PAROT": 0.25, "PIG": 0.85, "SHEEP": 0.75, "SQUID": 0.15, "TURTLE": 0.15, "WOLF": 0.25, "PLAYER": 0.95, "VILLAGER": 1.65, "WANDERING_TRADER": 1.85 }

long:
{ "BLAZE": 0.045, "CAVE_SPIDER": 0.0025, "CREEPER": 0.99, "DROWNED": 0.085, "ELDER_GUARDIAN": 0.3, "ENDERMAN": 0.19, "ENDERMITE": 0.01, "EVOKER": 1.0, "GUARDIAN": 0.45, "HOGLIN": 0.45, "HUSK": 0.05, "ILLUSIONER": 1.2, "PIGLIN": 0.075, "PILAGER": 1.00, "RAVAGER": 0.075, "SHULKER": 0.025, "SILVERFISH": 0.0025, "SKELETON": 0.0015, "SKELETON_HORSE": 0.025, "SLIME": 0.0065, "SPIDER": 0.0025, "STRAY": 0.05, "VEX": 0.055, "VINDICATOR": 1.35, "WITCH": 1.45, "WITHER": 0.395, "ZOGLIN": 0.25, "ZOMBIE": 0.05, "ZOMBIE_HORSE": 0.075, "ZOMBIE_VILLAGER": 0.055, "ZOMBIFIED_PIGLIN": 0.1, "CAT": 0.25, "CHICKEN": 0.25, "COD": 0.015, "COW": 1.05, "DOLPHIN": 1.45, "DONKEY": 0.65, "FOX": 0.13, "HORSE": 0.85, "IRON_GOLEM": 2.55, "LLAMA": 0.45, "MULE": 0.75, "MUSHROOM_COW": 0.975, "OCELOT": 0.35, "POLAR_BEAR": 0.95, "PANDA": 0.85, "PAROT": 0.25, "PIG": 0.85, "PUFFERFISH": 0.015, "RABBIT": 0.015, "SALMON": 0.015, "SHEEP": 0.75, "SQUID": 0.15, "TROPICAL_FISH": 0.015, "TURTLE": 0.15, "WOLF": 0.25, "PLAYER": 0.95, "VILLAGER": 1.65, "WANDERING_TRADER": 1.85, "TRADER_LLAMA": 1.35 }
Expected behavior
To have slept last night instead of trouble shooting this plugin until well into the afternoon.

Screenshots
[12:57:50] [Server thread/INFO]: [GlobalWarming] Enabling GlobalWarming v1.3.0 [12:57:50] [Server thread/INFO]: [GlobalWarming] Lang loaded: [en-US] [12:57:52] [Server thread/INFO]: [GlobalWarming] Record created for world: [Ultimate_Survival] [12:57:52] [Server thread/INFO]: [GlobalWarming] Record created for world: [Ultimate_Survival_nether] [12:57:52] [Server thread/INFO]: [GlobalWarming] Record created for world: [Ultimate_Survival_the_end] [12:57:52] [Server thread/INFO]: [GlobalWarming] Loading climate engine for: [Ultimate_Survival] [12:57:52] [Server thread/WARN]: com.google.gson.JsonSyntaxException: duplicate key: null [12:57:52] [Server thread/WARN]: at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190) [12:57:52] [Server thread/WARN]: at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) [12:57:52] [Server thread/WARN]: at com.google.gson.Gson.fromJson(Gson.java:887) [12:57:52] [Server thread/WARN]: at com.google.gson.Gson.fromJson(Gson.java:852) [12:57:52] [Server thread/WARN]: at com.google.gson.Gson.fromJson(Gson.java:801) [12:57:52] [Server thread/WARN]: at net.porillo.engine.models.EntityMethaneModel.loadModel(EntityMethaneModel.java:25) [12:57:52] [Server thread/WARN]: at net.porillo.engine.models.EntityMethaneModel.<init>(EntityMethaneModel.java:19) [12:57:52] [Server thread/WARN]: at net.porillo.engine.api.WorldClimateEngine.<init>(WorldClimateEngine.java:49) [12:57:52] [Server thread/WARN]: at net.porillo.engine.ClimateEngine.loadWorldClimateEngine(ClimateEngine.java:39) [12:57:52] [Server thread/WARN]: at net.porillo.engine.ClimateEngine.loadWorldClimateEngines(ClimateEngine.java:60) [12:57:52] [Server thread/WARN]: at net.porillo.GlobalWarming.onEnable(GlobalWarming.java:101) [12:57:52] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) [12:57:52] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) [12:57:52] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) [12:57:52] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500) [12:57:52] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414) [12:57:52] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471) [12:57:52] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241) [12:57:52] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:940) [12:57:52] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) [12:57:52] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:835) [12:57:52] [Server thread/ERROR]: [GlobalWarming] Error loading model file: plugins/GlobalWarming/models/Ultimate_Survival/entityMethaneModel.json [12:57:52] [Server thread/ERROR]: [GlobalWarming] Could not load into the expected <EntityType, MobDistribution> mapping. [12:57:52] [Server thread/ERROR]: [GlobalWarming] Please check the formatting and verify the types are correct. [12:57:52] [Server thread/ERROR]: Error occurred while enabling GlobalWarming v1.3.0 (Is it up to date?) java.lang.RuntimeException: No values found in: [plugins/GlobalWarming/models/Ultimate_Survival/entityMethaneModel.json] at net.porillo.engine.models.EntityMethaneModel.loadModel(EntityMethaneModel.java:37) ~[?:?] at net.porillo.engine.models.EntityMethaneModel.<init>(EntityMethaneModel.java:19) ~[?:?] at net.porillo.engine.api.WorldClimateEngine.<init>(WorldClimateEngine.java:49) ~[?:?] at net.porillo.engine.ClimateEngine.loadWorldClimateEngine(ClimateEngine.java:39) ~[?:?] at net.porillo.engine.ClimateEngine.loadWorldClimateEngines(ClimateEngine.java:60) ~[?:?] at net.porillo.GlobalWarming.onEnable(GlobalWarming.java:101) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:940) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-101] at java.lang.Thread.run(Thread.java:835) [?:?] [12:57:52] [Server thread/INFO]: [GlobalWarming] Disabling GlobalWarming v1.3.0 [12:57:52] [Server thread/INFO]: [GlobalWarming] Syncing database... [12:57:52] [Server thread/INFO]: [GlobalWarming] Finished syncing database. [12:57:52] [Server thread/ERROR]: Error occurred while disabling GlobalWarming v1.3.0 (Is it up to date?) org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register net.porillo.effect.negative.formation.IceForm@3a7962fe while not enabled at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:636) ~[patched_1.16.1.jar:git-Paper-101] at net.porillo.effect.EffectEngine.loadEffects(EffectEngine.java:65) ~[?:?] at net.porillo.effect.EffectEngine.<init>(EffectEngine.java:44) ~[?:?] at net.porillo.effect.EffectEngine.getInstance(EffectEngine.java:110) ~[?:?] at net.porillo.GlobalWarming.onDisable(GlobalWarming.java:132) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:415) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:516) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:384) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500) ~[patched_1.16.1.jar:git-Paper-101] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:940) ~[patched_1.16.1.jar:git-Paper-101] at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-101] at java.lang.Thread.run(Thread.java:835) [?:?]

Additional context
As I've said, it's irregular. I have gone through the model algorithmically and learned that the model will load with every entity in the long list if the list is broken down, leaving some out. However I have not determined which mobs are incompatible together in this list..

Further Notes
YOU'RE A GENIUS! this is an amazing plugin and I LOVE how it works and what it brings to the server environment. it really rounds out my Ultimate Survival server. Thank you! I will be sending some feature requests soon, once I've had a chance to sleep a bit.
Thank you for this amazing plugin and for the work you've done. I hope all is well with you.... cheers

p.s. please update for 1.16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.