//bonemeal: bugfix argument parsing

This commit is contained in:
Starbeamrainbowlabs 2021-12-28 01:26:53 +00:00
parent 58d3c1e43b
commit 462570f2eb
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 2 additions and 1 deletions

View file

@ -35,6 +35,7 @@ Note to self: See the bottom of this file for the release template text.
- `//replacemix`: Improve error handling to avoid crashes (thanks, Jonathon for reporting via Discord!) - `//replacemix`: Improve error handling to avoid crashes (thanks, Jonathon for reporting via Discord!)
- Cloud wand: Improve chat message text - Cloud wand: Improve chat message text
- Fix `bonemeal` mod detection to look for the global `bonemeal`, not whether the `bonemeal` mod name has been loaded - Fix `bonemeal` mod detection to look for the global `bonemeal`, not whether the `bonemeal` mod name has been loaded
- `//bonemeal`: Fix argument parsing
- `//walls`: Prevent crash if not parameters are specified by defaulting to `dirt` as the replace_node - `//walls`: Prevent crash if not parameters are specified by defaulting to `dirt` as the replace_node
- `//maze`, `//maze3d`: - `//maze`, `//maze3d`:
- Fix generated maze not reaching the very edge of the defined region - Fix generated maze not reaching the very edge of the defined region

View file

@ -27,7 +27,7 @@ worldedit.register_command("bonemeal", {
return false, "Invalid strength value (value must be an integer)" return false, "Invalid strength value (value must be an integer)"
end end
end end
if #parts >= 2 then if #parts >= 1 then
chance = worldeditadditions.parse.chance(table.remove(parts, 1)) chance = worldeditadditions.parse.chance(table.remove(parts, 1))
if not chance then if not chance then
return false, "Invalid chance value (must be a positive integer)" return false, "Invalid chance value (must be a positive integer)"