Jump to content

[1.10] The Animation System


pWn3d

Recommended Posts

How does it work?

 

The only explanation that can be found is: https://github.com/MinecraftForge/MinecraftForge/blob/1.10.x/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java

And there is also a grammar definition, but that is not really enough to understand how it works, since no function/parameter is documented.

 

Has someone managed how to use it? What can it do, what can't be done?

How to use it for Items?

 

What exactly is a clip, a state and a transition?.

Link to comment
Share on other sites

From what i see looking through that class is that it is used to animate A TileEntity and it seemingly uses an Entity aswell to do so? And I was told by diesieben07 that it requires a TESR

as seen

here

ClientRegistry.bindTileEntitySpecialRenderer(Chest.class, new AnimationTESR<Chest>()
            {
                @Override
                public void handleEvents(Chest chest, float time, Iterable<Event> pastEvents)
                {
                    chest.handleEvents(time, pastEvents);
                }
            });

 

And the registering of the entity here

           EntityRegistry.registerModEntity(EntityChest.class, entityName, 0, ModelAnimationDebug.instance, 64, 20, true, 0xFFAAAA00, 0xFFDDDD00);
            RenderingRegistry.registerEntityRenderingHandler(EntityChest.class, new IRenderFactory<EntityChest>()
            {
                @SuppressWarnings("deprecation")
                public Render<EntityChest> createRenderFor(RenderManager manager)
                {
                    /*model = ModelLoaderRegistry.getModel(new ResourceLocation(ModelLoaderRegistryDebug.MODID, "block/chest.b3d"));
                    if(model instanceof IRetexturableModel)
                    {
                        model = ((IRetexturableModel)model).retexture(ImmutableMap.of("#chest", "entity/chest/normal"));
                    }
                    if(model instanceof IModelCustomData)
                    {
                        model = ((IModelCustomData)model).process(ImmutableMap.of("mesh", "[\"Base\", \"Lid\"]"));
                    }*/
                    ResourceLocation location = new ModelResourceLocation(new ResourceLocation(MODID, blockName), "entity");
                    return new RenderLiving<EntityChest>(manager, new net.minecraftforge.client.model.animation.AnimationModelBase<EntityChest>(location, new VertexLighterSmoothAo(Minecraft.getMinecraft().getBlockColors()))
                        {
                            @Override
                            public void handleEvents(EntityChest chest, float time, Iterable<Event> pastEvents)
                            {
                                chest.handleEvents(time, pastEvents);
                            }
                        }, 0.5f)
                    {
                        protected ResourceLocation getEntityTexture(EntityChest entity)
                        {
                            return TextureMap.LOCATION_BLOCKS_TEXTURE;
                        }
                    };
                }
            });

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

No I have not used this Animation before, but I'm pretty sure that some people like LexManos and Diesieben know what it is.

 

Is this the grammer definition you mentioned?  grammar.js -> engine.json

What, who mentioned grammar.js and an engine.json?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Oh I'm sorry I didn't look at your profile, I just assumed it was him, and I haven't slept yet. :3

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Have you used animation state machines before?

 

Is this the grammer definition you mentioned?  grammar.js -> engine.json

 

Yes thats what I meant with the grammar definition. I have not used an animation state machine before, but I know what a state machine is, didn't think of that, facepalm.

 

Still It would be nice to have another example, a basic one. Whats the minimum setup, Like 1 or 2 state + a simple transition. I want to fully understand how it works so I can make proper use of it.

 

 

 

Oh I'm sorry I didn't look at your profile, I just assumed it was him, and I haven't slept yet. :3

 

You overlooked my super cool power armor avatar? Pffff ;D

Link to comment
Share on other sites

I setup a basic animated block using vanilla models(not obj or b3d). It's a lever that looks like a repeater and slides to the other side when you click it.

 

The code to setup the animation for the block seems fairly straight forward. I commented notes into the code; which could have wrong info, so don't take it as gospel.

 

The json files are still a bit of a mystery to me. I get parts of them, but I still have a bit to figure out. I'll try to write up some proper documentation on them once I learn their ins and outs a bit more.

 

Here's the github if you want to check it out and toy around.

Link to comment
Share on other sites

I setup a basic animated block using vanilla models(not obj or b3d). It's a lever that looks like a repeater and slides to the other side when you click it.

 

The code to setup the animation for the block seems fairly straight forward. I commented notes into the code; which could have wrong info, so don't take it as gospel.

 

The json files are still a bit of a mystery to me. I get parts of them, but I still have a bit to figure out. I'll try to write up some proper documentation on them once I learn their ins and outs a bit more.

 

Here's the github if you want to check it out and toy around.

 

Thanks, thats definitely helps. I will try to make a simple anim on an item. If get it working, I will post the details.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.