Jump to content

Recommended Posts

Posted (edited)

There is a WIP PR for documentation on this that has everything that is on this tutorial, and will soon have more such as Items and Entities. Here is a link to the PR.

 

In this tutorial I will be explaining how to use the Animation State Machine or Forge's Animation System on a TileEntity, though this can be applied to Items or Entities as well.

 

Let's start off easy, with the code for the Block, TileEntity and the binding of the TESR.

 

Block

  Reveal hidden contents
 

TileEntity

  Reveal hidden contents
 

TESR Binding

  Reveal hidden contents
 

 

This is where the confusion comes from for the animation system. The armature and ASM JSON files. The ASM file has it's own "grammar" which is outlined by fry, here. This is a little vague so I will try to explain this a bit more, so that it is easier to understand with what I have come to know through my own attempts at using this system.

 

Armature File

  Reveal hidden contents
1

 

ASM File

  Reveal hidden contents

 

Sample BlockState File

  Reveal hidden contents

 

I'm sure there are typos or possibly something I have missed or not explained well enough, so I would love some feedback even on formatting issues. I will also post my raw notes on this stuff that might contain extra information.

  Reveal hidden contents

 

Edited by Animefan8888
  • Like 1
  • Thanks 1

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.

  • 4 weeks later...
Posted

Thank you for this tutorial.

However, you made a small but significant typo in your ASM json file which crashes the game.

The key "start-state" should actually be "start_state" as annotated in AnimationStateMachine.java:74.

@SerializedName("start_state")
private final String startState;

It took me quite a while to figure out what's wrong, because this kind of typo is particularly hard to notice.

Posted
  On 8/6/2018 at 10:52 PM, yurifag said:

However, you made a small but significant typo in your ASM json file which crashes the game.

The key "start-state" should actually be "start_state" as annotated in AnimationStateMachine.java:74.

Expand  

Oh, thank you I wrote this late at night after finally getting my animation to work. I will change that.

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.

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.