geckolib мод на майнкрафт

Geckolib мод на майнкрафт

geckolib мод на майнкрафт

GeckoLib is an animation engine for Minecraft Mods, with support for complex 3D keyframe-based animations, 30+ easings, concurrent animation support, sound and particle keyframes, event keyframes, and more. Available for Forge and Fabric.

Installation

geckolib мод на майнкрафт geckolib мод на майнкрафт

Package repository hosting is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Please see the Getting Started guide for detailed installation instructions per modding framework.

Documentation

GeckoLib provides detailed documentation in the form of a Wiki. GeckoLib is currently available for Forge 1.12, 1.15, 1.16 and Fabric 1.15 and 1.16.

Support

If you have questions or need help getting up and running with questions, feel free to join our discord!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Sponsor Us

If you’d like to help support us, feel free to donate to our patreon. The patreon is also where we post major announcements about the future of GeckoLib. We post smaller announcements in our discord.

Источник

Installing

To use the library in a dev environment, add this to your build.gradle file. For forge users, you have to make a new repositories block. Otherwise, your build will fail. Do not add the repository to the buildscript section of your gradle.

Installing the Plugin

geckolib мод на майнкрафт

Video Tutorial

If you prefer videos to written documentation, TurtyWurty made a great Geckolib 2.0 Tutorial to walk you through how to rig, animate, and code:

geckolib мод на майнкрафт

Creating a Model

geckolib мод на майнкрафт

Converting an Existing Model

Rigging

The process of preparing a model for animation is known as «rigging». You can think of it as the process of creating a skeleton for your model. Spending a little time rigging makes the animation process much easier.

Grouping

In entity models, you cannot rotate cubes, only groups. So, click the «add group» button and make sure all your cubes are inside group «folders»:

geckolib мод на майнкрафт

Parenting and Pivots

The rig for a model is like a skeleton. Groups are the bones, pivots are the joints, and cubes are the flesh.

Unless your model has multiple object parts that can move independently (like if your entity was a school of fish), you probably want a single root group with many nested child groups. When each group moves, it also moves it’s children.

geckolib мод на майнкрафт

Pivot points can be set using the pivot tool and affect what point a group pivots from when it rotates.

geckolib мод на майнкрафт

This is easier to explain visually so you can watch this video showing how to set up parenting and pivots for a simple skeleton:

geckolib мод на майнкрафт

These images are from the article Minecraft Modeling & Texturing Tips by MasterianoX. You can read it for more detail and lots more helpful modeling tips.

Animating

You can animate your model in the Animation tab on the right. Geckolib currently supports position, scale, and rotation keyframes. Support for sound, particle, and custom event keyframes is in development. It’s also important that you set the loop setting to the appropriate value for each animation in the editor. This will determine if the animation will loop in game. You can set this value by right-clicking the animation in the Animation Pane and selecting loop.

Animating in GeckoLib is almost exactly the same as how you would animate for a bedrock entity, so most bedrock animation tutorials also apply to GeckoLib.

Animation Concepts

Ideally, animations should be split up as much as possible. Geckolib allows you to run multiple animations simultaneously, so in order to make the smoothest transitions, you should split up each logical animation. For example, if you’re making a flying creature with several flying types, several running types, and several head movements, you should split each one into it’s own animation and combine them in code.

In this example, you should make these animations in blockbench (examples): * Default Head Movement Animation * Spitting Head Animation * Wing Flapping Animation (only involving wings) * Faster Wing Flapping Animation (only involving wings) * Running Animation (only involving legs) * Walking Animation (only involving legs)

This is different to the normal way most people animate. Usually, you would animate the entire body at once and duplicate it + adjust keyframes. This can certainly work, but it will provide for a less seamless transition period in between animations. Additionally, the modular system Geckolib encourages allows for more possible animation combinations and a greater control for the developer.

(2.0) Working with easing curves

GeckoLib 2.0 added a powerful new feature called easing curves. These allow you to create smooth, natural-looking animations with less effort than previously.

In Bedrock and GeckoLib 1.0, the only type of «tweening» or interpolation that could be used between keyframes was linear interpolation, or «lerp». This means that as time progresses forwards, the value would change from the starting keyframe to the next keyframe at a constant speed. Real objects don’t usually move in this way, they tend to need to accelerate a bit when starting and decelerate when stopping.

An easing curve is a mathematical function that can allow for animations to be interpolated in a more gradual fashion. The value of the «tween» at any given point in time is taken from the given easing curve rather than a straight line. This allows you to easily achieve effects like a smooth start and stop, an object overshooting its destination and sliding back into place (back curve), or an object bouncing (bounce curve).

geckolib мод на майнкрафт

Source: 1ucasvb. Note some curve names differ from ours but the principles are the same.

In addition, there are three directions a curve can be applied. «In» usually means the curve is applied focusing on the beginning of the interpolation, focusing on a smooth-looking start. «Out» usually means the curve is applied focusing on the end of the interpolation (the reverse of «In»), focusing on a smooth-looking end. «InOut» means the curve is symmetrically applied to both the start and end. In the animation above, when the animation plays from left to right it corresponds to «In», and when it plays backwards/right to left it corresponds to «Out». See below for a comparison:

geckolib мод на майнкрафт

We implemented all of the easing curves from easings.net and recommend you check out that website for an interactive, animated explanation of all the different curves and directions.

We also added a default «linear» curve to emulate bedrock behavior, and a «step» curve which snaps the value to a specified number of steps instead of moving smoothly. This can be used to animate things like clock hands or simulate a reduced framerate.

geckolib мод на майнкрафт

In addition, we created arguments for the «back», «elastic», and «bounce» curves to give you additional control over their shapes.

In GeckoLib, we use the right-hand or «to» keyframe to specify the easing for each tween. Therefore, there is no easing curve on the first keyframe in any timeline. You need to make a second keyframe in order to assign an easing curve.

Eliot also made a code sandbox to explore the different curves and see the effect of the adjustment parameters for ones that have them. Feel free to play around with it if you find it helpful.

Here’s a short demo of how to use the easing curves editor: geckolib мод на майнкрафт

Exporting Your Model

(2.0) Animated Entity Settings Window

GeckoLib 2.0 added an Animated Entity Settings Window which can be accessed from the File menu for Animated Java Entity projects:

geckolib мод на майнкрафт

This can be used to customize the Java code template so that you can export many times if needed without having to manually edit the code afterwards. These settings are completely optional, you can just edit the code by hand still if you prefer.

geckolib мод на майнкрафт

Read Next

To add your model and animation in game, read how to do so here.

Источник

Geckolib мод на майнкрафт

GeckoLib is an animation library for Minecraft Mods, with support for complex 3D keyframe and scriptable math-based animations. Available for Forge and Fabric (1.12, 1.15, 1.16). Supports entity, block, item, armor animations and more.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

geckolib мод на майнкрафт

GeckoLib is an animation engine for Minecraft Mods, with support for complex 3D keyframe-based animations, 30+ easings, concurrent animation support, sound and particle keyframes, event keyframes, and more. Available for Forge and Fabric.

geckolib мод на майнкрафт geckolib мод на майнкрафт geckolib мод на майнкрафт

Please see the Getting Started guide for detailed installation instructions per modding framework.

GeckoLib provides detailed documentation in the form of a Wiki. GeckoLib is currently available for Forge 1.12, 1.15, 1.16 and Fabric 1.15 and 1.16.

If you have questions or need help getting up and running with questions, feel free to join our discord!

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

If you’d like to help support us, feel free to donate to our patreon.

Package repository hosting is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

About

GeckoLib is an animation library for Minecraft Mods, with support for complex 3D keyframe and scriptable math-based animations. Available for Forge and Fabric (1.12, 1.15, 1.16). Supports entity, block, item, armor animations and more.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *