mirror of
https://github.com/GeyserExtensionists/GeyserModelEnginePackGenerator.git
synced 2025-12-19 15:09:18 +00:00
use int property for animation controller
This commit is contained in:
@@ -54,10 +54,7 @@ public class ExtensionMain implements Extension {
|
|||||||
GeyserUtils.addProperty(id, entity + ":" + bone, Boolean.class);
|
GeyserUtils.addProperty(id, entity + ":" + bone, Boolean.class);
|
||||||
});
|
});
|
||||||
|
|
||||||
GeyserUtils.addProperty(id, "modelengine:anim_idle", Boolean.class);
|
GeyserUtils.addProperty(id, "modelengine:anim", Integer.class);
|
||||||
GeyserUtils.addProperty(id, "modelengine:anim_spawn", Boolean.class);
|
|
||||||
GeyserUtils.addProperty(id, "modelengine:anim_walk", Boolean.class);
|
|
||||||
GeyserUtils.addProperty(id, "modelengine:anim_stop", Boolean.class);
|
|
||||||
|
|
||||||
GeyserUtils.registerProperties(id);
|
GeyserUtils.registerProperties(id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ public class AnimationController {
|
|||||||
],
|
],
|
||||||
"transitions": [
|
"transitions": [
|
||||||
{
|
{
|
||||||
"idle": "query.property('modelengine:anim_idle')"
|
"idle": "query.property('modelengine:anim') == 2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"walk": "query.property('modelengine:anim') == 3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stop": "query.property('modelengine:anim') == 0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -25,13 +31,13 @@ public class AnimationController {
|
|||||||
],
|
],
|
||||||
"transitions": [
|
"transitions": [
|
||||||
{
|
{
|
||||||
"spawn": "query.property('modelengine:anim_spawn')"
|
"spawn": "query.property('modelengine:anim') == 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"walk": "query.property('modelengine:anim_walk')"
|
"walk": "query.property('modelengine:anim') == 3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stop": "query.property('modelengine:anim_stop')"
|
"stop": "query.property('modelengine:anim') == 0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -41,26 +47,26 @@ public class AnimationController {
|
|||||||
],
|
],
|
||||||
"transitions": [
|
"transitions": [
|
||||||
{
|
{
|
||||||
"spawn": "query.property('modelengine:anim_spawn')"
|
"spawn": "query.property('modelengine:anim') == 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stop": "query.property('modelengine:anim_stop')"
|
"stop": "query.property('modelengine:anim') == 0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idle": "query.property('modelengine:anim_idle')"
|
"idle": "query.property('modelengine:anim') == 2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"stop": {
|
"stop": {
|
||||||
"transitions": [
|
"transitions": [
|
||||||
{
|
{
|
||||||
"idle": "query.property('modelengine:anim_idle')"
|
"idle": "query.property('modelengine:anim') == 2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"spawn": "query.property('modelengine:anim_spawn')"
|
"spawn": "query.property('modelengine:anim') == 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"walk": "query.property('modelengine:anim_walk')"
|
"walk": "query.property('modelengine:anim') == 3"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user