Jump to content

lethinh

Members
  • Posts

    191
  • Joined

  • Last visited

Everything posted by lethinh

  1. And btw, it seems like if the mob goes nearer (for about 2 blocks or nearer), the tile entity won't hit the mob
  2. 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.
  3. it is replaced with worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX)
  4. 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!
  5. 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!
  6. Is it like so: boolean behind = entity.getLookVec().dotProduct(otherEntity.getLookVec()) < -0.8D; ?
  7. Thank you. Is it like this: entity.getPositionVector().dotProduct(otherEntity.getLookVec()) == -1 I want to check if the original entity is behind other entity
  8. Vec3d direction = entity.getPositionVector().add(entity.getLookVec()); And after that, I wonder what to do next?
  9. Vector? You mean Vec3d? And by the way how to check using vector and the entity's LookVec? (normalizing?)
  10. 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
  11. 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!
  12. I understand you but what will happen if the original entity has the same position with the invisible one?
  13. How to check if there are any invisible entities in the original entity position, and not attack the invisible ones but attack the original one? Also, the invisible entity yaw is different from the original one. I would greatly appreciate your help!
  14. Thanks for your reply. I have got the player and the entity look vec. So I wonder what to do next?
  15. Thanks for your help but it doesn't seem to work. I saw the method canEntityBeSeen in EntityLivingBase but it is only for blocks.I wonder if there are anyways to make it check Entity?
  16. How to check whether there are any entities behind entity or not? Please help me. Thanks in advance!
  17. I have tried this code: https://pastebin.com/FJqx1RLi , but that doesn't seem to work when the player or the entity has moved. Please help me. Thanks in advance!
  18. You should use Minecraft.getMinecraft().timer.timerSpeed
  19. Sorry, I have just upgraded to 1.12 But I don't know how to mainipulate the Pythagorean theorem
×
×
  • Create New...

Important Information

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