The Best Resource for Minecraft
The Best Resource for Minecraft

Loot tables: pools, rolls और entries व functions के बीच का अंतर

Loot tables: pools, rolls और entries व functions के बीच का अंतर

एक loot table जो कुछ भी नहीं गिराती, आमतौर पर उसके weights या उसकी conditions गलत स्तर पर होती हैं। यहाँ बताया गया है कि प्रत्येक नेस्टिंग स्तर क्या नियंत्रित करता है, और जानने योग्य फ़ंक्शन्स कौन-से हैं।

Loot table JSON चार स्तर गहरा होता है और प्रत्येक स्तर का अर्थ अलग होता है। लगभग हर "मेरी टेबल कुछ भी नहीं गिराती" वाली समस्या एक ऐसी condition होती है जो अपने सही स्थान से एक स्तर दूर जुड़ी होती है।

चार स्तर

table
└── pools[]          how many independent draws
    └── entries[]    what can come out of this draw
        └── functions[]   modify the item that came out
  • rolls pool पर यह तय करता है कि वह pool कितनी बार ड्रा करता है। एक pool जिसमें rolls: 3 draws

उसी entry सूची से तीन बार।

  • weight एक entry पर उसके pool के भीतर सापेक्ष होता है। Weights का कुल योग होना आवश्यक नहीं है

कुछ भी; weight 90 के मुकाबले weight 10 वाली entry दस में से एक बार आती है।

  • conditions हर स्तर पर मौजूद होती हैं और उनके अलग अर्थ होते हैं। एक pool पर वे नियंत्रित करती हैं

पूरे ड्रा को। एक entry पर वे उस एक विकल्प को नियंत्रित करती हैं। एक function पर वे केवल संशोधन को नियंत्रित करती हैं।

किसी ड्रॉप की गारंटी के लिए उसके अपने pool की आवश्यकता होती है

Weights किसी भी चीज़ की गारंटी नहीं दे सकते, क्योंकि एक pool प्रति roll ठीक एक entry चुनता है। एक टेबल जिसे हमेशा एक नक्शा और साथ में रैंडम लूट गिरानी चाहिए, उसे दो pools की आवश्यकता होती है:

"pools": [
  { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:filled_map" } ] },
  { "rolls": { "min": 2, "max": 4 }, "entries": [ … weighted list … ] }
]

Pool एक में केवल एक entry होती है, इसलिए यह हमेशा इसे देती है। Pool दो weighted सूची से 2–4 बार रोल करता है।

जानने योग्य फ़ंक्शन्स

फ़ंक्शनक्या करता है
set_countएक निश्चित संख्या या एक uniform range
enchant_randomlyरैंडम enchantments, वैकल्पिक रूप से एक सूची से
enchant_with_levelsN स्तरों पर enchanting table की तरह — अनुरोध किए जाने पर treasure भी शामिल
set_componentsकस्टम नाम, lore, कोई भी डेटा घटक
looting_enchantLooting के प्रत्येक स्तर पर बोनस; केवल entity टेबल्स
set_damageभिन्न के रूप में durability, ताकि 0.5 is half-worn
furnace_smeltजब mob आग में मरता है तो उसका smelted रूप

enchant_with_levels and enchant_randomly are not interchangeable. The first mimics an enchanting table and respects level costs; the second picks arbitrarily and can produce combinations the game would never generate.

Conditions जिनका लोग अक्सर उपयोग करते हैं

  • random_chance — a flat probability
  • random_chance_with_enchanted_bonus — the modern Looting-aware chance
  • killed_by_player — the reason your rare drop never appears from a fall death
  • entity_properties — check the victim's type, state or equipment
  • match_tool — check the tool used, for block tables

दुनिया को फिर से बनाए बिना परीक्षण करना

/loot give @s loot my_pack:chests/treasure

टेबल को सीधे आपकी इन्वेंट्री में गिराता है। /loot spawn, /loot insert <pos> and /loot replace cover the other placements. This is far faster than placing chests and reloading, and it is the only sane way to check weight distributions.

सही स्तर पर जुड़े फ़ंक्शन्स और कंडीशन्स के साथ मल्टी-पूल टेबल्स बनाएँ Advanced Loot Table Builder.

टूल आज़माएं: Advanced Loot Table Builder →