Browse Source

'plugins/dropedit2.md' ändern

MasterCake 5 năm trước cách đây
mục cha
commit
80c6c04665
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  1. 14 0
      plugins/dropedit2.md

+ 14 - 0
plugins/dropedit2.md

@@ -106,6 +106,20 @@ A red shulker box lets you drop a bunch of items at once, so you can add a compl
 
 A yellow shulker box expands the custom drop inventory by 27 slots. DropEdit will add all items configured in a yellow shulker box to the pool of items from which DropEdit chooses a random item afterward.
 
+### Conditional Data Filter (Mob drops only)
+
+This item can contain a specific filter string. When added to one of the container types listed above, it will only drop the contents of the container when the filter string is contained within the entity's data string. For example, you may want pillagers to drop a diamond sword, but only if they're pillager captains, meaning they're having banners on their head.
+![](/media/DropEdit2_ConditionalDataFilter_PillagerCaptain.png)
+
+In order to accomplish this, you can run the vanilla command `/data get entity @e[type=minecraft:pillager,limit=1]` for getting an idea which part of the string data differs from the default villager. In this example, you can easily see that a captain pillager got a `white_banner` inside the `ArmorItems` category:
+
+![](/media/DropEdit2_ConditionalDataFilter_NBTExample.png)
+
+Now, run the command `/dropedit getfilter white_banner` in order to get the filter item (hopper). Add this to a shulker box (the batch container fits best for this) in order to put the condition on one or more items.
+Finally, you can add the box as a custom drop.
+
+![](/media/DropEdit2_ConditionalDataFilter_ShulkerBox.png)
+
 ## Flags
 
 ![](/media/DropEdit2_FlagGUI.jpg)