Posted March 31, 20205 yr 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?
March 31, 20205 yr 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.
April 1, 20205 yr Author But aren't animations supposed to be client only? Or just the model rendering.
April 1, 20205 yr 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.
April 1, 20205 yr Author 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?
April 1, 20205 yr 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.
April 1, 20205 yr 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.
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.