The Best Resource for Minecraft
The Best Resource for Minecraft

एक शर्त वाले predicate में कोई wrapper नहीं होता है, और यह एक वास्तविक संरचनात्मक बदलाव है

एक शर्त वाले predicate में कोई wrapper नहीं होता है, और यह एक वास्तविक संरचनात्मक बदलाव है

एक शर्त स्वयं ऑब्जेक्ट होती है। दो या अधिक all_of या any_of में रैप हो जाती हैं। साथ ही आठ शर्त प्रकार, और क्यों उलटना (inverting) एक फ़्लैग के बजाय एक wrapper है।

एक datapack predicate एक JSON फ़ाइल है जो किसी शर्त का विवरण देती है, और इसकी संरचना इस बात पर निर्भर करती है कि आपके पास कितनी शर्तें हैं। यही वह हिस्सा है जहाँ किसी उदाहरण को कॉपी करके आगे बढ़ाने वाले लोग गलती कर बैठते हैं।

एक, एक की सूची नहीं है

शर्तेंआउटपुट संरचना
0{}
1स्वयं शर्त ऑब्जेक्ट
2+{ "condition": "minecraft:all_of", "terms": [ … ] }

एकल शर्त के चारों ओर कोई wrapper नहीं होता है। दूसरी शर्त जोड़ें और पूरी फ़ाइल की संरचना बदल जाती है — मूल शर्त इसका पहला तत्व बन जाती है terms array under a new root. Anything that reads or generates these has to handle both forms, and an example built from one condition does not show you the shape you will need the moment you add another.

any_of is the alternative combinator: सभी शर्तें पास होनी चाहिए, या कोई भी उनमें से एक।

उलटना (inverting) भी एक wrapper है, कोई फ़्लैग नहीं

कोई नहीं है "invert": true field. A negated condition is wrapped:

{ "condition": "minecraft:inverted", "term": { …the original condition… } }

नोट term, singular — inverted takes exactly one, where all_of and any_of take a terms array. Two similar-looking keys with different shapes, and inversion applies per condition, so a predicate can mix inverted and plain terms freely inside one all_of.

आठ शर्त प्रकार

entity_properties            random_chance
value_check                  random_chance_with_looting
weather_check                time_check
location_check               match_tool

random_chance_with_looting is the one worth pausing on: it takes a base chance और a looting_multiplier, so the probability scales with the killer's Looting level. That makes it meaningful only where a killer exists in context — it is a drop-rate condition, not a general-purpose random gate. Plain random_chance is the one to reach for everywhere else.

value_check compares a number against one of three sources: enchantment स्तर, luck, या एक कस्टम एक्सप्रेशन जिसे आप कॉपी करने के बाद JSON में मैन्युअल रूप से एडिट करते हैं।

पिकर पूरी तरह से वैनिला सेट हैं

यह जानना उपयोगी है जब आप जाँच रहे हों कि कोई biome या structure id वास्तविक है या नहीं: बिल्डर के ड्रॉपडाउन कोई सीमित नमूना नहीं हैं।

  • 66 biomes — खेल का हर biome, बिना कुछ छूटे और बिना कुछ गढ़े
  • 34 structures — उसी प्रकार
  • 18 block tags और 15 items, जो हैं एक कार्यात्मक सबसेट

इसे अनुमान लगाने के बजाय खेल के अपने रजिस्ट्री डेटा से सत्यापित किया गया था, इसलिए यदि कोई id biome या structure सूची में अनुपस्थित है, तो वह id मौजूद नहीं है। block tags और items के लिए यह उल्टा है: अनुपस्थिति का मतलब केवल यह है कि पिकर इसे सूचीबद्ध नहीं करता है, और स्वयं id टाइप करना ठीक है।

टूल आज़माएं: Predicate & Condition Builder →