Jump to content

Recommended Posts

Posted

Hi everyone. So the mod I will be creating is "Improved Hitbox Mod". What I want to do is that I want to make 3 separate (ie head, body, leg) hit box of the character instead of 1 huge rectangle. When the player hit a specific hit box, it does specific thing (ie when the player hit the hit box on the head of the mod, it deals double damage). Can anyone give me some guidance on how can I modify the hit box using Java?

Posted
10 hours ago, Jerm said:

Hi everyone. So the mod I will be creating is "Improved Hitbox Mod". What I want to do is that I want to make 3 separate (ie head, body, leg) hit box of the character instead of 1 huge rectangle. When the player hit a specific hit box, it does specific thing (ie when the player hit the hit box on the head of the mod, it deals double damage). Can anyone give me some guidance on how can I modify the hit box using Java?

Look at Ender dragons. Start with making your own entity and get it working perfectly before trying to modify the player

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

Actually it sort of depends on whether you're making a new entity with separate hit boxes or whether you want to add these to existing entities. The ender dragon is an example for if you're making a new entity -- basically you divide the entity into multiple "child" entities that follow each other to look like they're all one mob.

 

However, if you want to add the hitboxes to an existing mob that is a single model the idea is similar but different. You would still create multiple "child" entities but you would make them invisible. You would then need them to realistically figure out where they are supposed to be based on the main entity's position. You would probably also handle the event for the main entity being hit and ignore that, instead only dealing damage for your improved hitboxes.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • 2 weeks later...

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.