I'm currently working on a block that its tile entity can automatically hit the mob. My problem is when I use the Vec3d dot product check if the entity is in the block tile entity hitbox, I realized that the block tile entity won't hit if the mob goes nearer the block. Here is my code:
I would greatly appreciated your help! Thanks in advance.
So far as I have known, there is a method called processRightClick in PlayerControllerMP class. But there is one parameter called hitVec, and I want to calculate it correctly, like this picture:
I am wondering if there are anyways to do this. Thanks in advance!
I have no ideas what is Tessellator and VertexBuffer are, and how do they work. I have read some on the Internet but they aren't specific enough for me to understand. I hope you guys could explain them specifically to me and give me some examples. Thanks in advance!
Thank you. Is it like this: entity.getPositionVector().dotProduct(otherEntity.getLookVec()) == -1 I want to check if the original entity is behind other entity
I tried to compare two entities' posX and posZ whether it is equal, greater or less, but I don't know which of them will check if entity is behind, in front of, leftward or rightward other entity
I am wondering how to check if entity is behind, in front of, leftward or rightward other entity. Currently, I tried posX, posZ of two entities to check but it doesn't seem to be correct. Please help me. Thanks a lot!