[1.12.2u] Incorrect bound with nextInt
Geethebluesky opened this issue ยท 2 comments
Got this error doing nothing in particular:
Description: Exception ticking world
java.lang.IllegalArgumentException: bound must be positive
at java.util.Random.nextInt(Unknown Source)
at com.pam.harvestcraft.blocks.growables.BlockPamCrop.func_180650_b(BlockPamCrop.java:171)
at net.minecraft.block.Block.func_180645_a(Block.java:508)
at net.minecraft.world.WorldServer.func_147456_g(WorldServer.java:476)
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:225)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Unknown Source)
I was getting this issue when I had set the configuration cropGrowthSpeed=0.0
to a negative value.
crops {
# Default: 0.0, This number is added/subtracted from normal fertile crop growth (3.0) and adjacent fertile crop growth (4.0).
D:cropGrowthSpeed=-2.0
...
}
I assumed that this could be a negative value as the comment describes that it will be subtracted. I was hoping to make crops grow more slowly. This was not the case.
Setting this value back to 0.0 fixed my issue and stopped the crash.