LanternPowered / Lantern

An open-source Minecraft server that implements the SpongeAPI.
MIT License
108 stars 12 forks source link

Cannot register key with integer value as the default for one with double value #17

Closed parlough closed 7 years ago

parlough commented 7 years ago

image

Cybermaxke commented 7 years ago

You cannot pass another key as the default value, like you did here. And I added methods with Functions to use maximum and minimum values of different types. For example: (You will need to rebase, because I renamed them due some conflics.) c.registerWithSuppliedMax(LanternKeys.MAX_SATURATION, 40.0, 0.0, container -> container.get(Keys.FOOD_LEVEL).get().doubleValue());

parlough commented 7 years ago

Thank you very much :)