Entity Teams [1.10.2]

I am running sponge 1.10.2-2477-5.2.0-BETA-2793. I am having an issue getting an Entity’s team information. I am creating a forge mod and the mod works perfectly when I disable sponge. Please see the forum post below:

http://www.minecraftforge.net/forum/topic/62399-entity-team-info-1102/

To sum it up, something in sponge is preventing me from getting an entity’s scoreboard team information. I hope y’all can help! I really need sponge for my server, I have become quite dependent on it. I’d hate to try and move on without it.

Is that AABB very large, or many entities inside that AABB?

If so it’s a Sponge configuration problem.

As an optimization (that really needs to be disabled by default) Sponge limits the amount of entities checked with getEntitiesWithinAABB for performance reasons (before Mojang added the mob cramming game rule)

https://docs.spongepowered.org/stable/en/server/getting-started/configuration/sponge-conf.html?highlight=max-entities-within-aabb

Under Entity Collisions

max-entities-within-aabb integer 8 Max amount of entities any given entity or block can collide with. Set to 0 to disable.

Should be set to 0 to disable.

Also if it’s a very large bounding box:

max-bounding-box-size integer 1000

should also be changed.

Sorry for the inconvenience.

I am using an aabb with a radius of 4 and there is only one entity. I don’t think that is it.

1 Like

Is this 1.10 or 1.12?

And can you test this under 1.12 as well (if it’s 1.10).

We have since ended support for 1.10, so if it’s not the configuration issue above, you only really have 2 options.

  • Find someone willing to invest time(or do it yourself) to create a PR to Sponge for 1.10
  • Confirm it’s in 1.12, request a fix for 1.12, request it to be backported, and hope the solution is trivial to backport.

It is 1.10.2. I’ll have to covert my mod to 1.12 and give it a try. Where would I request a fix for 1.12?

The error isn’t in 1.12. :frowning:. Can anyone help me fix this in sponge 1.10.2?

Your best bet is debugging the mod in a SpongeForge environment.

This will allow you to step your code into Sponge/Forge and see where the problem lies.

To start with, follow the instructions on the readme GitHub - SpongePowered/SpongeForge: A Forge mod that implements SpongeAPI to set up a SpongeForge project.

If using IntelliJ I recommend installing the https://minecraftdev.org/ to gain additional debugging capabilities, that are Mixin/Minecraft specific.

Once this is done, you should be able to add your mod as a sub project, and debug both.