Skip to content

A light-weight library mod for Minecraft 1.19+, providing API for animations of mobs' textures

License

Notifications You must be signed in to change notification settings

SashaKYotoz/AniTexLib

Repository files navigation

Status: In active development | Stable


AniTexLib

Logo

About

A light-weight library mod for Minecraft 1.19+, providing API for animations of mobs' textures

[API doesn't provide any content to Minecraft by its own except configurable pig-exampled-animation, 5 particle types and example item]

AniTexLib provides 2 variants of animator - static and dynamic

How to work with animators:

To create static animator for your entity you have to:

  • Register in public constructor of your main mod class TextureAnimator.addEntityToAnimate("Name of you main class".class,"modId of your mod","name of folder in /textures/ folder (f.e. entity/pig_animated)","name of texture + number of its index in animation queue (f.e. pig_animated)");

  • Create in mentioned folder json file named like name of your texture + .png.json, and put their parameters of interval,frames' amount and base name of texture mentioned before

  • Use TextureAnimator.getAnimatedTextureByName("your modId","full path to texture (f.e. textures/entity/pig_animated/)","basic name of textures (f.e.pig_animated)")

To create dynamic animator for your entity you have to:

  • Put in your texture folder textures and number them correct "base_name_of_texture" [Don't put .png after name]

  • In getTextureLocation() method in entity's renderer put AnimateOptionsReader.getObjectWithoutUpdate(modId,pEntity.getUUID()) == null ? TextureAnimator.getManagedAnimatedTextureByName(modId,"","",conditionWhenStopAnimation,someStopFrame,someInterval,someAmountOfFrames,entityUUID) : TextureAnimator.getManagedAnimatedTextureByName(modId,null,null,null,null,null,null,pEntity.getUUID());

Extra provided lib stuff:

  • New item implementation to invoke spawn of specific particle, when item lies on ground
  • Sparkle-like, Wisp-like and wave-like particles and 3 new renderer types

Note: Used renderer system of particles like wisp | sparkle, was partially implemented from Wizards Reborn

Authors

SashaKYotoz

About

A light-weight library mod for Minecraft 1.19+, providing API for animations of mobs' textures

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published