minecraft:behavior.avoid_block आपके लिए सेट कर देता है।Get GodCraftओवरव्यू
minecraft:behavior.avoid_block एक एंटिटी कंपोनेंट है: यह कस्टम मॉब के components ऑब्जेक्ट में, या उसके किसी component group में जाता है। AI goal जिससे मॉब कुछ खास ब्लॉक्स से दूर हटता है, जैसे hoglins warped fungus से बचते हैं।
फ़ील्ड
| फ़ील्ड | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
walk_speed_modifier | number | 1 | दूर चलते समय speed multiplier। 1.0 पर सामान्य स्पीड रहती है। |
sprint_speed_modifier | number | 1 | दूर दौड़ते समय speed multiplier। 1.0 पर सामान्य स्पीड रहती है। |
search_range | integer | 0 | मॉब अगल-बगल कितने ब्लॉक तक बचने वाले ब्लॉक्स ढूंढता है। |
search_height | integer | 0 | मॉब ऊपर-नीचे कितने ब्लॉक तक बचने वाले ब्लॉक्स ढूंढता है। |
tick_interval | integer | 1 | goal कितने ticks में एक बार जांचता है कि उसे शुरू होना चाहिए या नहीं। |
target_selection_method | string | "nearest" | बचने वाला ब्लॉक कैसे चुना जाए, जैसे सबसे पास वाला। |
on_escape | ActorDefinitionTrigger[] | कोई नहीं | मॉब के ब्लॉक से बच निकलने पर चलने वाले इवेंट्स। |
target_blocks | Item Descriptor[] | कोई नहीं | ब्लॉक्स जिनसे यह मॉब दूर रहता है। |
avoid_block_sound | LevelSoundEvent | "undefined" | ब्लॉक से बचते समय बजने वाला sound event। |
sound_interval | FloatRange | {"max":8,"min":3} | बचने की आवाज़ों के बीच रैंडम इंतज़ार की रेंज, सेकंड में। |
priority | integer | 0 | कम नंबर पहले चलता है: जब दो goals आपस में टकराते हैं, तो छोटी priority वाला जीतता है।रेंज: 0 से … |
control_flags | Goal's control flags[] | कोई नहीं | यह goal शरीर के किन हिस्सों (move, look, jump) को अपने कब्ज़े में लेता है, ताकि एक ही हिस्से इस्तेमाल करने वाले goals साथ में न चलें। |
उदाहरण
BP/entities/<name>.json के components ऑब्जेक्ट के अंदर (मान डिफ़ॉल्ट या placeholder हैं):
BP/entities/<name>.json
{
"minecraft:behavior.avoid_block": {
"walk_speed_modifier": 1,
"sprint_speed_modifier": 1,
"search_range": 0,
"search_height": 0,
"tick_interval": 1,
"target_selection_method": "nearest",
"on_escape": [],
"target_blocks": []
}
}