minecraft:behavior.lay_egg आपके लिए सेट कर देता है।Get GodCraftओवरव्यू
minecraft:behavior.lay_egg एक एंटिटी कंपोनेंट है: यह कस्टम मॉब के components ऑब्जेक्ट में, या उसके किसी component group में जाता है। AI goal जिससे गर्भवती मॉब सही ब्लॉक पर अंडे वाला ब्लॉक रखता है, जैसे कछुआ रेत पर अंडे देता है।
फ़ील्ड
| फ़ील्ड | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
target_blocks | string[] | ["minecraft:sand"] | ब्लॉक्स जिन पर अंडा रखा जा सकता है। |
target_materials_above_block | string[] | ["air"] | टारगेट ब्लॉक के ऊपर क्या हो सकता है: Air, Water या Lava। |
allow_laying_from_below | boolean | false | true हो तो ऊपर न पहुंच पाने पर मॉब नीचे से अंडे दे सकता है, पानी पर spawn देने वाले मेंढकों के लिए काम का। |
use_default_animation | boolean | true | true हो तो built-in अंडे देने का animation चलता है। |
lay_seconds | number | 10 | अंडे देने में कितने सेकंड लगते हैं।रेंज: 0 से … |
egg_type | string | "minecraft:turtle_egg" | रखा जाने वाला अंडे का ब्लॉक। कछुए के अंडों की गिनती रैंडम होती है। |
lay_egg_sound | LevelSoundEvent | "lay_egg" | अंडे देते समय बजने वाला sound event। |
on_lay | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | अंडा देने के बाद चलने वाला इवेंट। |
search_range | integer | 0 | मॉब अगल-बगल कितने ब्लॉक तक अंडे देने की जगह ढूंढता है। |
search_height | integer | 1 | मॉब ऊपर-नीचे कितने ब्लॉक तक अंडे देने की जगह ढूंढता है। |
goal_radius | number | 0.5 | पहुंचा माने जाने के लिए मॉब को कितना पास आना होगा। |
speed_multiplier | number | 1 | जगह की ओर जाते समय speed multiplier।रेंज: 0 से … |
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.lay_egg": {
"target_blocks": [
"minecraft:sand"
],
"target_materials_above_block": [
"air"
],
"allow_laying_from_below": false,
"use_default_animation": true,
"lay_seconds": 10,
"egg_type": "minecraft:turtle_egg",
"lay_egg_sound": "lay_egg",
"on_lay": {
"event": "",
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"target": "self"
}
}
}