Source:
public void initializeCollisionState(World worldObj) { SpongeConfig<? extends GeneralConfigBase> activeConfig = ((IMixinWorldServer) worldObj).getActiveConfig(); SpongeConfig<? extends GeneralConfigBase> globalConfig = SpongeImpl.getGlobalConfig(); EntityCollisionCategory collisionCat = globalConfig.getConfig().getEntityCollisionCategory(); this.maxCollisions = collisionCat.getMaxEntitiesWithinAABB(); boolean requiresSave = false; CollisionModCategory collisionMod = collisionCat.getModList().get(this.entityModId); if (collisionMod == null && activeConfig.getConfig().getEntityCollisionCategory().autoPopulateData()) { collisionMod = new CollisionModCategory(this.entityModId); collisionCat.getModList().put(this.entityModId, collisionMod); collisionMod.getEntityList().put(this.entityName, this.maxCollisions); globalConfig.save(); return; } else if (collisionMod != null) { if (!collisionMod.isEnabled()) { this.maxCollisions = -1; return; } Integer modCollisionMax = collisionMod.getDefaultMaxCollisions().get("entities"); if (modCollisionMax != null) { this.maxCollisions = modCollisionMax; } Integer entityMaxCollision = null; if ((Object) this instanceof EntityItem) { entityMaxCollision = collisionMod.getEntityList().get(this.spongeEntityType.getName()); } if (entityMaxCollision == null) { entityMaxCollision = collisionMod.getEntityList().get(this.entityName); } if (entityMaxCollision == null && activeConfig.getConfig().getEntityCollisionCategory().autoPopulateData()) { collisionMod.getEntityList().put(this.entityName, this.maxCollisions); requiresSave = true; } else if (entityMaxCollision != null) { this.maxCollisions = entityMaxCollision; } } if (this.maxCollisions <= 0) { return; } if (requiresSave && activeConfig.getConfig().getEntityCollisionCategory().autoPopulateData()) { globalConfig.save(); } return; }

Target:
public void initializeCollisionState(World worldObj) { SpongeConfig<? extends GeneralConfigBase> activeConfig = ((IMixinWorldServer) worldObj).getActiveConfig(); SpongeConfig<? extends GeneralConfigBase> globalConfig = SpongeImpl.getGlobalConfig(); EntityCollisionCategory activeCollCat = activeConfig.getConfig().getEntityCollisionCategory(); EntityCollisionCategory globalCollCat = globalConfig.getConfig().getEntityCollisionCategory(); this.setMaxCollisions(activeCollCat.getMaxEntitiesWithinAABB()); boolean requiresSave = false; CollisionModCategory activeCollMod = activeCollCat.getModList().get(this.getModDataId()); CollisionModCategory globalCollMod = globalCollCat.getModList().get(this.getModDataId()); if (activeCollMod == null && activeCollCat.autoPopulateData()) { globalCollMod = new CollisionModCategory(this.getModDataId()); globalCollCat.getModList().put(this.getModDataId(), globalCollMod); globalCollMod.getEntityList().put(this.getModDataName(), this.getMaxCollisions()); globalConfig.save(); return; } else if (activeCollMod != null) { if (!activeCollMod.isEnabled()) { this.setMaxCollisions(-1); return; } Integer modCollisionMax = activeCollMod.getDefaultMaxCollisions().get("entities"); if (modCollisionMax != null) { this.setMaxCollisions(modCollisionMax); } Integer entityMaxCollision = null; if ((Object) this instanceof EntityItem) { entityMaxCollision = activeCollMod.getEntityList().get(this.getModDataName()); } if (entityMaxCollision == null) { entityMaxCollision = activeCollMod.getEntityList().get(this.getModDataName()); } if (entityMaxCollision == null && activeCollCat.autoPopulateData()) { globalCollMod.getEntityList().put(this.getModDataName(), this.getMaxCollisions()); requiresSave = true; } else if (entityMaxCollision != null) { this.setMaxCollisions(entityMaxCollision); } } if (this.getMaxCollisions() <= 0) { return; } if (requiresSave) { globalConfig.save(); } }