Posted June 4, 201510 yr Hello guys! I just discovered that the method getEntitiesWithinAABB(Class, AxisAlignedBB) never returns an instance of EntityDragonPart. This is pretty annoying because this prohibits me from creating some automated attacking devices. However, for some reason the method getEntitiesWithinAABBExcludingEntity(Entity, AxisAlignedBB) does return instances of EntityDragonPart. But I don't want to use this method, because I don't want to exclude entities, I want to get every one. Is there a way I can avoid this issue? And why does it happen? http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
June 4, 201510 yr Hello guys! I just discovered that the method getEntitiesWithinAABB(Class, AxisAlignedBB) never returns an instance of EntityDragonPart. This is pretty annoying because this prohibits me from creating some automated attacking devices. However, for some reason the method getEntitiesWithinAABBExcludingEntity(Entity, AxisAlignedBB) does return instances of EntityDragonPart. But I don't want to use this method, because I don't want to exclude entities, I want to get every one. Is there a way I can avoid this issue? And why does it happen? Nope, it's written like that, but: you can pass null as Entity in excludingEntity, this will give you all entities, including subentities.... EDIT: for more info, here 2 core methods from Chunk class, that are doing that, take look at them: getEntitiesOfTypeWithinAAAB, getEntitiesWithinAABBForEntity (=excluding) Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
June 5, 201510 yr Author Ahh, I understand Thanks for the detailed explanation http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
June 5, 201510 yr I ran into a similar problem checking for interfaces; you can get around it by writing your own method to search for entities and use that when you expect the vanilla method will fail. You can see the method I wrote to do so in the above link. http://i.imgur.com/NdrFdld.png[/img]
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.