New update, new commands, new procs!
Commands
denchant
An enchantment command that's a little easier to use, and more importantly, autofill's in Denizen registered enchantments. The regular vanilla enchant command doesn't autofill, so it's hard to know if the enchantment was registered correctly and you're typing it wrong, or if the enchant never registered in the first place. Also has clever warning messages to let you know whether the enchants you are using are within vanilla range, whether the enchant will work on the item, or if the enchant will conflict with another enchant. A lot of the heavy lifting is due to the new enchantment tags monkey added.
Procedures
ordinal
Input a number and get the relevant ordinal attached to it. Ex. 1 -> 1st, 15 -> 15th, 23 -> 23rd.
one_in_x
A procedure that just returns
true
or
false
based off the number you put in, with a chance of 1/x. So if you put in 2, that's a 1/2 chance, or 50% chance you'd get a
true
or
false
.
mix_dyes
Takes a list of Minecraft dyes and returns a ColorTag based on mixing those dyes together. The list can be of any length, and must be ItemTags. NOTE:
While most of the dyes are an accurate representation of the color of the dye, passing in a white dye or a black dye will return pure white or pure black, unlike vanilla Minecraft where the white and black dyes are not pure colors. To tweak that, simply go in the core/data.dsc, and change the white and black hex values. In another update I will add in a config option that makes it easier to change this.
formatted_date
A no-context procedure that just returns a nicely formatted date in the form of "3:16 PM, July 31st, 2021"
Tweaks/Fixes/Changes
- Tweaked
random_placement
, notable_tool
usages to look a bit nicer.
- Added
on item enchanted
event and on prepares anvil craft
to make sure enchants registered through Denizen have the lore attached to them. It's not perfect if the lore already happens to contain text identical to what the enchantment is trying to do but it's serviceable, and necessary if you want Denizen registered enchants to function like vanilla ones, in regards to enchanting tables and anvils. NOTE: You can't make the enchantment name pop up in the enchanting table; when you hover over a button, it'll be blank if it's a custom enchant. That's just a quirk of vanilla Minecraft and isn't fixable right now.
- Fixed weighted random to get epsilon from data script.