Suggestion for A Comprehensive Update to EquipmentSlots
Summary
EquipmentSlots Mythicmobs wiki
Vanilla Commands can do what mythic can't
Update to EquipmentSlots, to have similar capabilities to /execute if items entity @e[limit=1] <slot_type> or <slot_type>.<slot_number>
. The fact that I can target some slots with Vanilla Commands while I cant do that with Mythicmobs is infuriating.
I'm trying to recreate a more advanced version of the "Disorganization" potion buff from RLcraft with Mythicmobs. "Disorganization" randomizes the target's inventory with the current items that's in the inventory; I'm trying to make my version work with blockentities too.
Implementation
Adds the Vanilla feature, and expands upon it.
- All containers that Vanilla Commands can target
- Improve bags and custom storage container's customizability and compatibility
vanilla feature oversimplified summary
Slot type:
slot_ype
is like the post code, it tells Minecraft approximately where the thing is.
Slot number:
slot_number
is like the house number, it tells Minecraft exactly where the thing is; but there can be duplicates in a single entity.
ie: The player, there are 3 different "slot_number=0" with them being Hotbar, Inventory, and Enderchest
Why this instead of Mapped Index:
gives a namespace for backpack, and custom storage blocks, allowing for more customizability and compatibility
Bags & Furniture Container
- The
slot_type
will be/return with the bag/furniture's internal item name. - The
slot_number
will be/return with a numerical value with similar logic to the Vanillacontainer.<slot_number>
, just with the ability to go above 53.
Click to expand
can utilize the suggested condition `- EntityContainsItem` to check for an item that's in a bag, making quivers possible. - skill:MyCustomSkill ?EntityContainsItem{item=arrow;slottype=MyCustomQuiver;slot=*}
8 New placeholders
Caster Placeholders | Function |
---|---|
<caster.ContentItem.{slot_type}.{slot_number}> | Returns the internal name of the item that in that slot slot map |
<caster.ContentAmount.{slot_type}.{slot_number}> | Returns the amount of items in that slot slot map |
Target Placeholders | Function |
---|---|
<target.ContentItem.{slot_type}.{slot_number}> | Returns the internal name of the item that in that slot slot map |
<target.ContentAmount.{slot_type}.{slot_number}> | Returns the amount of items in that slot slot map |
Trigger Placeholders | Function |
---|---|
<trigger.ContentItem.{slot_type}.{slot_number}> | Returns the internal name of the item that in that slot slot map |
<trigger.ContentAmount.{slot_type}.{slot_number}> | Returns the amount of items in that slot slot map |
Item Placeholders | Function |
---|---|
<caster.item.slotnumber> | Returns the slot number that the item is in slot map |
<caster.item.slottype> | Returns the slot type that the item is in slot map |
2 New Conditions
Condition | Type | Description |
---|---|---|
BlockContainsItem | Block | Checks that targeted blockentity's inventory slots to see if there is a similar item |
Attribute | Aliases | Description | Default |
---|---|---|---|
item | i, material, m, mm, mythicitem | The item or a list of items to check for. Accepts ANY or * |
DIRT |
slotnumber | sn | The Contents Slot to check for. Accepts ANY or * or a range or a list of numbers |
* |
strict | exact, e | Whether the matcher should more strictly match the target item | false |
To check if a block contains an item
Conditions:
- BlockContainsItem{i=MyCustomItem;slot=0} true
Condition | Type | Description |
---|---|---|
EntityContainsItem | Entity | Checks that targeted entity's inventory slots to see if there is a similar item |
Attribute | Aliases | Description | Default |
---|---|---|---|
item | i, material, m, mm, mythicitem | The item or a list of items to check for. Accepts ANY or * |
DIRT |
slottype | st | The Type of Slot to check for | inventory |
slotnumber | sn | The Contents Slot to check for. Accepts ANY or * or a range or a list of numbers |
* |
strict | exact, e | Whether the matcher should more strictly match the target item | false |
To check if an entity contains an item, note slottype=horse
is also used for Llama, Donkey, and Mule. slot=inventory
is also used for Chestboats, Chestminecarts, Hopperminecarts, Piglins, and Villagers.
Conditions:
- EntityContainsItem{i=MyCustomItem;slottype=horse;slot=1} true
- mythicmobtype{t=MyCustomMount} true
4 New Targeters
Targeter | Shorthand | Description |
---|---|---|
@CasterEquipmentSlot | @CasterItemSlot | Targets a specific the item slot on the caster |
@TargetEquipmentSlot | @TargetItemSlot | Targets a specific the item slot on the target |
@TargetedEquipmentSlot | @TargetedItemSlot | Targets the specific the item slot of the inherited targets |
@TriggerEquipmentSlot | @TriggerItemSlot | Targets a specific the item slot on the trigger |
Attribute | Aliases | Description | Default |
---|---|---|---|
slottype | st | The type of slots to target | inventory |
slotnumber | sn | The content slots to target. Accepts ANY or * or a range or a list of numbers |
0 |
Usage
- SetItemOption{option=StackSize;value=12} @TargetItemSlots{slottype=hotbar;slotnumber=0;targetconditions=[ - isplayer true ]}Usage
Dynamic Mob Behavior based on "some variable"
There are currently no condition for checking for items inside mounts, with this we'll be able to assign weight to items, which can change the speed for mounts.
"See" what's in a chest
There are currently no way of checking what's in a Blockentity, <target.block.data> DOES NOT RETRUN CONTAINER DATA
what_is_this_block:
Skills:
- message{m="&7<&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq>"} @obstructingBlock
- message{m=" "} @obstructingBlock
- message{m="&e&lTarget Block Data <&eq> &r&6<target.block.data>"} @obstructingBlock
- message{m=" "} @obstructingBlock
- message{m="&b&lTarget Block Type <&eq> &r&9<target.block.type>"} @obstructingBlock
- message{m=" "} @obstructingBlock
- message{m="&7<&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq><&eq>"} @obstructingBlock
If mobs can "see" into the inventories of blockentities
The amount of cool things that this can do, imagine a creeper that doesn't go after the player, instead it went after the chest full of Netherite
Value
Quality of life, and limitless possibility.
Priority
High, this is something that's doable in Vanilla. I'd like to be able to do everything within mythic instead of needing to rely on a datapack and a billion scoreboards.