Many Useful Things Library

Many Useful Things Library 1.2.0

Bug Fixes​

Turned off debug on all commands
Round lib_between since it throws an error if the number isn't an int.

Added:​

lib_grow_mushroom and lib_grow_fungus​

They check if a mushroom or fungus can be grown before trying to grow it, which prevents the "could not generate tree at location" error the generate_tree mech loves to throw.

lib_is_material​

Checks if a location in a direction is a material. instead of needing to do <[loc].up.material.name> == my_material all over the place, you can do <[loc].proc[lib_is_material].context[up|dirt]> or whatever. Good for, for example, checking if a fungus is on the block it's supposed to be on, or something like that. Might remove it because it might be a bit situational but seems useful.

lib_is_air​

Checks if a location is an air block. I do this so often, so I figured it'd be useful.

lib_full_volume​

Gets the full volume of a cuboid, including submembers. I'll probably end up making it handle all the polygons, but right now it only handles cuboids.

face_to_vector​

The opposite of vector_to_face. Takes something like "up" and turns into into a 1 length vector (0,1,0) which can be used in relative or whatever you want it for.

Removed:​

lib_is_player​

The check was so simple, it wasn't worth having an entire proc for.
Added:

lib_simulate_item_breaking​

Fakes a player breaking an held item. The item is not taken, but the sound plays, and the appropriate particles are generated.

lib_animated_actionbar​

Pass in a list, and a wait, and the actionbar will display one value from the list at a time, with the specified wait between each displaying. Basically wraps a for loop, but is used commonly enough in conjunction with animated_rainbow_text it's worth having it as a run for easy access.

lib_romanize​

Creates a roman numeral from a decimal number that you pass. I'm not sure how well it works past about 3 or 4 thousand due to roman numerals only really going up to M (1000), and technically a roman numeral isn't supposed to have more than three of the same numeral in a row. Useful for enchanting values, so you can have Unbreaking MMXIV instead of value.2014 or whatever it normally does.

lib_between​

Helper procedure for getting a random number between 1 and x. With the .proc[] way of doing procedures it can be a lot cleaner, because instead of needing to do <util.random.int[1].to[<[value]>]> you can just do <[value].proc[lib_between]>.

Also updated some core procs to allow for using the command usage system I have setup. It's still a core proc so it's messy and not very user friendly, but it's there.