Jump to content

fruehlingsrollen

Members
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

2764 profile views

fruehlingsrollen's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Sooooo I, again, have a little problem with my entity. Basically my entity has a solid AABB, and everything works fine, until the entity spans across into another chunk, that it isn't registered in, further than World::getMaxEntityRadius. I don't see any other solution than to manually iterate over each entity and handle the collision manually, or to Mixin into World::getEntitiesInAABBexcluding. So I wanted to ask here, is there any solution or do I really have to manually iterate over each loaded custom entity?
  2. Okay so I've found the solution, thanks warjort because you led me to the assumption that I had to somewhere update the chunks that keep track of the entity. I took a look at Entity::resetPositionToBB and it had the line "if (this.isAddedToWorld() && !this.world.isRemote && world instanceof ServerWorld) ((ServerWorld)this.world).chunkCheck(this);" which is the solution to all my problems, so I just added it into my setPosition Override.
  3. I have a custom entity that resizes accordingly to it's contents inside. I checked if the bounding box of the entity is correct after the resize and it is, the real problem is when I check for getEntitiesInAABB. With IntelliJ breakpoints I inspected the code and Chunk::getEntitiesWithinAABBForEntity does not find my custom entity, even when my player is right in it's bounding box. Whenever I spawn my entity without resizing it's contents the AABB check works fine, it only appears once I resize my entity and update it's bounding box. I really can't explain why this is happening and my only solution would be to check if the player is inside any of the custom entities at any given time, for that I would need access to every loaded entity in the world though, and I haven't found anything for that either. Help would be great! If you need any specific code snippets Im glad to share them
×
×
  • Create New...

Important Information

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