1. विकी
  2. /आइटम
  3. /Attachables

Attachables

जब कोई प्लेयर कस्टम आइटम पकड़े या पहने, तब 3D मॉडल दिखाएँ: रिसोर्स पैक की attachable फ़ाइल।

Attachable गेम को बताता है कि जब कोई आइटम पकड़ा या पहना जाए तो कौन-सा 3D मॉडल बनाना है। इसके बिना, पकड़ा हुआ आइटम अपने सपाट icon की तरह दिखता है। Armor को हमेशा इसकी ज़रूरत होती है, क्योंकि पहना हुआ armor प्लेयर पर लगा एक मॉडल होता है।

यह कहाँ जाता है

रिसोर्स पैक
RP/
  attachables/
    ruby_helmet.json
  models/
    entity/
      ruby_helmet.geo.json
  textures/
    models/
      ruby_armor.png

फ़ाइल

identifier बिहेवियर पैक में आइटम के identifier जैसा ही होना चाहिए।

RP/attachables/ruby_helmet.json
{
  "format_version": "1.10.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "wiki:ruby_helmet",
      "materials": {
        "default": "armor",
        "enchanted": "armor_enchanted"
      },
      "textures": {
        "default": "textures/models/ruby_armor",
        "enchanted": "textures/misc/enchanted_actor_glint"
      },
      "geometry": {
        "default": "geometry.humanoid.armor.helmet"
      },
      "scripts": {
        "parent_setup": "variable.helmet_layer_visible = 0.0;"
      },
      "render_controllers": ["controller.render.armor"]
    }
  }
}

इसके fields वही हैं जो एक client entity फ़ाइल इस्तेमाल करती है:

Fieldयह क्या करता है
materialsमॉडल कैसे बनाया जाता है। Armor armor इस्तेमाल करता है, दूसरे पकड़े जाने वाले मॉडल आमतौर पर entity_alphatest।
texturesमॉडल का texture, .png के बिना।
geometryमॉडल। geometry.humanoid.armor.helmet जैसे vanilla armor आकार काम करते हैं, या आपकी अपनी .geo.json।
render_controllersकौन-से textures और materials साथ जाते हैं।
scriptsआइटम बनाते समय चलने वाला Molang। ऊपर वाला parent_setup vanilla helmet layer को छिपाता है।

टिप्स

  • हर आइटम के लिए एक attachable। पूरे armor set के लिए चार फ़ाइलें।
  • Armor texture पूरे set के लिए एक ही sheet होता है, vanilla textures/models/armor/diamond_1.png की तरह बिछाया हुआ।
  • अपना मॉडल किसी model editor में बनाएँ, उसे .geo.json के रूप में एक्सपोर्ट करें और यहाँ उसका geometry.<name> इस्तेमाल करें।

आइटम: रिसोर्स पैक

We use cookies to improve your experience and analyse site traffic. Learn more