GithubHelp home page GithubHelp logo

sashakyotoz / anitexlib Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.48 MB

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

Home Page: https://www.curseforge.com/minecraft/mc-mods/anitexlib

License: Other

Java 96.09% GLSL 3.91%
fabric forge library-mod minecraft-mod neoforge

anitexlib's Introduction

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

anitexlib's People

Contributors

sashakyotoz avatar

Stargazers

 avatar Valeronum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.