2024-12-10 17:49:14|Myriagame |source:minecraft skins
This tutorial is set by the author to use the CC By-NC-SA protocol.
Original link: For Developers.
introduce
Thank you very much for choosing our EveryXDance module to develop dependency items or code -level links.Let me introduce you how it works, and what API you can use to create animation or preparation for biology.
First, remember to add spongepowered mixin to your build.gradle:
Buildscript {Repositories {
Maven {name = "sponge"; url 'https://repo.spongepowered.org/repository/maven-public/'}
}
Dependencies {
Elastic
Classpath 'org.spongepowered: mixingradle: 0.7-snapshot'
}
}
apply plugin: 'org.spongepowered.mixin'
Dependencies {AnnotationProcessor 'ORG.SPONGEPORED: mixin: 0.8.5: Processor'
}
Create animation
It is recommended to use blockbench
If you are confused about choosing software, I think Blockbench is one of the best choices for animators to make animations.
First, create a "Minecraft Skin" and select the "Zombie" model.It is recommended to use Minecraft default zombie physical texture, which is easier to design and make your animation.You can also use your skeleton, disaster villagers or any other model, of course, you can also use your model.
Then convert the project into a module entity.
Next, switch to the animation mode and create a new animation.Now please play freely and design your creature dance animation!It is recommended to make an animation of time such as 1 second, 2 seconds, 4 seconds, or 8 seconds.
After making animation, export it as a .java file.
Open the exported file, you may see the following code.Although this is not the ultimate code of adding dance animation, it is very close to your success!
How to convert code
First, replace all the "AnimationDefinition" in the code to "Danceanimation" and delete ".loading ()" because each dance animation cycle for compulsory.
Secondly, all string type identifiers in the model part should be replaced with the corresponding "Danceanimation.dancepart".For example, "head" → "danceanimation.dancepart.head"; "body" → "danceanimation.dancepart.body".
Then, replace all "New Keyframe (...)" to "New DanceanimationChannel.Keyframeholder (...)", and replace all "New AnimationChannel (AnimationChannel.targets.rotation, ...)" to "DANCEAN ImatingChannel.Rotation (...) "" New AnimationChannel (AnimationChannel.Targets.position, ...) "and" DanceanimationChannel.positation (...) "" AnimationChannel.Targets. Scale, ...) "and"DanceanimationChannel.scale (...) ".Use "New Vector3F (...)" directly instead of "KeyFrameanimations.degreevec (...)", "KeyFrameanimations.posvec (...)" or "KeyFrameanimations.scalevec (...)"Convert them, so you don't need to worry.Finally, add the first parameters of the first parameter of "DanceanimationChannel.rotation (...)" "DanceanimationChannel.position (...)" or "DanceanimationChannel.scale (...)".This parameter refers to the length of a certain animation channel (in seconds), and the parameter of "withlength ()" should be removed by all the length of each channel -because each channel will start from the beginning to any cycle to the beginning to the beginning to the beginning to the beginning to the beginning to the beginning to the beginning toEnd the entire animation.
After completing the above steps, you will get the correct code for adding your own animation.If I do n’t make it clear, please refer to some of the presets given by the original module.If you still encounter problems, create a new issue in the module's GitHub Repo and tell us what your confusion is.
Registered animation
com.hexagram2021.everyxdance.api.client is stored in all API classes for you to call.If you want to register your animation, please register your own animation preset from the Mod-BUS client event subscriber subscribed to the "CollectDancepresetevent" event and call "Event#Register" to register your own animation presets.
Create dancing preparation posture
We provide three types of dance preparations: "humanoid_stand" stands like zombies and skeletons, "Humanoid_sit" sitting on the mining car and the boat, "humanoid_crawl" crawled like pigs, cats and wolves.You can also create your own posture through the following steps:
First, call "IdanceableModel.preset.preparation#Create" to create your own posture.
Secondly, a subscriber subscriber subscribed by the FORGE-BUS client event subscribes to the "CustomPreparedanceEvent" event.You can use methods such as "iF (Event.getModel () Instanceofxmodel xxxmodel)" to check which model is preparing to dance.Please note that CustomPreparedanceevent will be triggered every time you beat during physical dance, so please do not use repeated and inefficient calculation code to process events -if necessary, please store intermediate variables.
Let your creatures dance
Each extended "MOB" creatures also realize "Idanceablentity", so each creature is dancing.To enable their dance, see the dance.
Most physical models implement "IdanceableModel".If you still cannot make a custom monster dance, let your model "iMplements IdanceModel".You can also use optional Mixin technology to make everyxdance become a optional dependency item for your module, not the necessary dependencies.
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57The story between humans and
2025-01-28 09:16:27Capture "Trinity 3: Artifact
2025-01-28 09:15:27Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22