Jump to content

Is it possible to have a multiple well animated hitbox for large entities


Kiljaeden053

Recommended Posts

Please bear with me for  I have not started yet and would discuss the concept and the idea properly before I start coding to prevent further complications. Just like ModelParts can hitboxes have child hitboxes and I have an idea that you can copy the position of the model when animated then send it to the server so that the hitboxes' position will be animated. Has anyone done this before? Is it even possible?

Link to comment
Share on other sites

8 hours ago, Kiljaeden053 said:

I have an idea that you can copy the position of the model when animated then send it to the server

This is not how client-server architecture works. The server determines where the hitbox is then sends that to the client. So you are going to need to control the animation on the server and update the hitboxes accordingly.

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

15 minutes ago, Kiljaeden053 said:

But aren't animations supposed to be client only? Or just the model rendering.

Just the rendering has to be client side only. Many things you want to animate in sync for players right? The only way to do that is by using the server to control the animation.

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

22 minutes ago, Animefan8888 said:

Just the rendering has to be client side only. Many things you want to animate in sync for players right? The only way to do that is by using the server to control the animation.

Ahh ok. How about hitboxes having child hitboxes? 

Link to comment
Share on other sites

13 hours ago, Kiljaeden053 said:

Ahh ok. How about hitboxes having child hitboxes?

Try looking at the ender dragon code. I havent looked in a long time (so it could well have changed) but it used to be made up of multiple parts.

Link to comment
Share on other sites

14 hours ago, Kiljaeden053 said:

Ahh ok. How about hitboxes having child hitboxes? 

Minecraft uses a single AABB as collision boxes for a single Entity. I suppose you could do a calculation inside Entity::getCollisionBox based on the entity it is asking about. Like return the closest AABB to the entity passed in.

 

Or definitely do what Alpvax said and check out the EnderDragon code.

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

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.