Inventory Profiles

Inventory Profiles

839k Downloads

Guide to Custom Rules?

JohnyDL opened this issue ยท 0 comments

commented

The guide seems to be a bit lacking in explaining what to do to make custom rules I have a little bit of programmer background but only enough to make me dangerous and I'm struggling to find what I need to do to do certain things (I want a custom rule that moves shulker boxes to the end of a chest and to make custom ordering for tools/enchantments)

I propose the following points need to be put onto the wiki's guide in a newbie friedly form (I'd be willing to do the write up if only I knew what the examples would actually be coded like):

  1. Simple ordering of items
    The default ordering options are:
  • Creative menu order
  • Item ID order
  • Item name order
    How to define sorting manually (example sort only a handful of items)
  1. Simple additional ordering
  • How to put something at the top of the list (example named items)
  • How to put something at the bottom of the list (example tools)
  1. Nested Ordering
  • Nested Hierarchy (Things at the top can use ordering from bellow but things at the bottom cannot use ordering from above due to the way over-riding works?)
  • most basic (example chaining 2 or 3 manual sorts together)
  • Selecting groups of items (example Weapons or Tools or Filters)
  • applying sub-rules to groups
  • nesting
  1. Filtering
  • String filtering (example does the item name contain the substring "netherite-" or "-axe")
  • Max stack size filtering (example does the item stack to 1, 16 or 64)
  • Current stack size filtering (example current stack count ordering)
  • Current container count filtering (example order chest by item count more than single stacks)
  1. Specialised sorting
  • NBT sorting (example if possible sort beehives by how many bees contained looking only at NBT tags?)
  • NBT sorting (example sorting shulker boxes by contents)
  • Enchantment sorting
  • Repair friendly auto refill (example replacing tool with a tool if available or just any none tool item (or empty the inventory slot) if no duplicate tool can be found to prevent tool breaking)
  • Ignoring custom names on certain types of items