Moisturization

Moisturization

885 Downloads

crash when a crop is on non-farmland block

Mumberthrax opened this issue ยท 0 comments

commented

Sometimes world generation, especially with some mods, puts crops on top of blocks that are not farmland and do not have the moisture property that farmland have. Moisturization at some point tries to check the value of that property in a block under a crop, and then the game crashes when it can't find the property in a grass block, dirt block, path block, stone block, etc.

crash log: https://mclo.gs/CE38mAv

I think this is the relevant section of the crash log:

Caused by: java.lang.IllegalArgumentException: Cannot get property class_2758{name=moisture, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7]} as it does not exist in Block{minecraft:dirt_path}

Versions:
mc 1.18.2
fabric: 0.14.8
moisturization: 1.1.2
fabric api: 0.58.0
cloth config: 6.2.62
java: openjdk 18.0.1.1

steps to reproduce:

  1. create new world using seed: 2178991586212221492
  2. /tp @p x:18 y:124 z:-285
  3. wait for chunk to load
  4. wait for moisturization to do its thing (a few seconds)
  5. observe crash to desktop

image


I really like the idea of the mod, especially for trying to recreate the effect of needing to water crops daily by hand with a watering can in the harvest festival mod. Thanks for putting time into making and sharing it with us.