डेटा कंपोनेंट्स के बाद /give कमांड: NBT टैग की जगह क्या आया
1.20.5 ने आइटम NBT को डेटा कंपोनेंट्स से बदल दिया, और ऑनलाइन अधिकांश /give स्निपेट अभी भी पुराने तरीके से लिखे गए हैं। यहाँ आपके जाने-पहचाने टैग से अब काम करने वाले कंपोनेंट्स की मैपिंग दी गई है।
यदि आप पेस्ट करते हैं /give command from an older guide and the game answers Unknown item tag or silently drops your enchantments, the command is written against the pre-1.20.5 NBT format. Item data moved to डेटा कंपोनेंट्स, और पुराना {display:{Name:...}} blob no longer parses.
प्रारूप बदल गया
old /give @p diamond_sword{display:{Name:'"Skybreaker"'},Enchantments:[{id:sharpness,lvl:5}]}
new /give @p diamond_sword[custom_name='"Skybreaker"',enchantments={sharpness:5}]
स्क्वायर ब्रैकेट्स, ब्रेसिज़ नहीं। कंपोनेंट्स आइटम id पर एक सपाट, कॉमा-अलग की गई सूची हैं।
वे मैपिंग जिनकी आपको वास्तव में ज़रूरत होगी
| पुराना NBT | डेटा कंपोनेंट |
|---|---|
display:{Name:...} | custom_name |
display:{Lore:[...]} | lore |
Enchantments:[{id,lvl}] | enchantments={id:level} |
Unbreakable:1b | unbreakable={} |
CustomModelData:3 | custom_model_data=3 |
AttributeModifiers:[...] | attribute_modifiers |
display:{color:...} | dyed_color |
SkullOwner | profile |
तीन सावधानियां
- Quotes लगाना।
custom_nametakes a JSON text component, so a plain string still needs
आर्ग्यूमेंट के अंदर इसके अपने quotes: custom_name='"Skybreaker"'.
- डिफ़ॉल्ट हटाना। शुरुआत में जोड़ें
!to strip a component the item normally has —
[!attribute_modifiers] gives a sword with no damage bonus at all.
- Bedrock में इनमें से कुछ भी नहीं है। Bedrock
/givestill uses its own data-value and
कंपोनेंट मॉडल; एक Java कंपोनेंट स्ट्रिंग वहां नहीं चलेगी।
यह /give जेनरेटर आपके लिए कंपोनेंट प्रारूप लिखता है और दोनों संस्करणों के लिए आउटपुट दिखाता है, ताकि आप उसे कॉपी कर सकें जो आपके सर्वर से मेल खाता है।