Jump to content

I can hit small mob like player


Turakar

Recommended Posts

Hello,

I've got a EntityLiving which does render ( :D ), but the problem is that i can hit him from one block above although its model is pretty small. Also his 0|0 point is one block above his actual position (like the x, y, z from a player in his head). Any suggestions?

Thank you for help

Turakar

Link to comment
Share on other sites

Set the entity size in the entity constructor.  It is likely the default height (1.8 blocks I think)

 

try

 

 

setSize(1.0f, 1.0f);

 

should set both the width and height to 1 block

(method is called with width first, then height)

 

 

The y  position bit is likely related to the yOffset I believe  (Not really sure, I set the yOffset on all of my entities to 0).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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