Mowzie's Mobs

Mowzie's Mobs

58M Downloads

[1.18.2] Mowzie's mobs are adding overhead to each mob/tick

Reshy opened this issue ยท 1 comments

commented

Seems like Mowzie's mobs are adding overhead to each mob tick:

net.minecraft.server.level.ServerLevel.tickNonPassenger()63.30%

net.minecraft.world.entity.Mob.tick()51.33%
    net.minecraft.world.entity.LivingEntity.tick()51.23%
        net.minecraft.world.entity.animal.Animal.aiStep()25.55%
            net.minecraft.world.entity.AgeableMob.aiStep()25.55%
                net.minecraft.world.entity.Mob.aiStep()25.50%
                    net.minecraft.world.entity.LivingEntity.aiStep()25.46%
                        net.minecraft.world.entity.Mob.serverAiStep()13.43%
                            net.minecraft.world.entity.ai.goal.GoalSelector.tick()12.46%
                                net.minecraft.world.entity.ai.goal.WrappedGoal.canUse()11.45%
                                    com.bobmowzie.mowziesmobs.server.ai.AvoidEntityIfNotTamedGoal.canUse()1.46%
                                        net.minecraft.world.entity.ai.goal.AvoidEntityGoal.canUse()1.45%
                                            net.minecraft.world.level.EntityGetter.getEntitiesOfClass()1.45%1016ms (self: 24ms - 0.03%)
                                                net.minecraft.world.level.Level.getEntities()1.42%
                                                    net.minecraft.world.level.entity.LevelEntityGetterAdapter.get()1.42%
                                                        net.minecraft.world.level.entity.EntitySectionStorage.getEntities()1.42%
                                                            net.minecraft.world.level.entity.EntitySectionStorage.forEachAccessibleNonEmptySection()1.42%
                                                                net.minecraft.world.level.entity.EntitySectionStorage$$Lambda$43436/0x00000008047008f0.accept()0.39%
                                                                it.unimi.dsi.fastutil.longs.LongAVLTreeSet$Subset.iterator()0.26%
                                                                it.unimi.dsi.fastutil.longs.LongAVLTreeSet$SetIterator.nextLong()0.22%
                        net.minecraft.world.entity.LivingEntity.jumpFromGround()0.06%
        net.minecraftforge.common.ForgeHooks.onLivingUpdate()10.87%
            net.minecraftforge.eventbus.EventBus.post()10.87%
                net.minecraftforge.eventbus.EventBus.post()10.87%
                    net.minecraftforge.eventbus.EventBus$$Lambda$4536/0x0000000800dbc5e0.invoke()10.82%
                        net.minecraftforge.eventbus.ASMEventHandler.invoke()8.35%
                            net.minecraftforge.eventbus.ASMEventHandler_418_ServerEventHandler_onLivingTick_LivingUpdateEvent.invoke()0.74%
                                com.bobmowzie.mowziesmobs.server.ServerEventHandler.onLivingTick()0.74%
                                    com.bobmowzie.mowziesmobs.server.capability.CapabilityHandler.getCapability()0.63%
                                        net.minecraftforge.common.capabilities.ICapabilityProvider.getCapability()0.53%
                                            net.minecraft.world.entity.LivingEntity.getCapability()0.53%
                                                net.minecraftforge.common.capabilities.CapabilityProvider.getCapability()0.45%
                                    com.bobmowzie.mowziesmobs.server.capability.FrozenCapability$FrozenCapabilityImp.tick()0.03%
        net.minecraft.world.entity.animal.Sheep.aiStep()1.39%
            net.minecraft.world.entity.animal.Animal.aiStep()1.39%
                net.minecraft.world.entity.AgeableMob.aiStep()1.39%
                    net.minecraft.world.entity.Mob.aiStep()1.39%
                        net.minecraft.world.entity.LivingEntity.aiStep()1.39%
                            net.minecraft.world.entity.Mob.serverAiStep()1.08%
                                net.minecraft.world.entity.ai.goal.GoalSelector.tick()1.03%
                                    net.minecraft.world.entity.ai.goal.WrappedGoal.canUse()0.98%
                                        com.bobmowzie.mowziesmobs.server.ai.AvoidEntityIfNotTamedGoal.canUse()0.06%
                                            net.minecraft.world.entity.ai.goal.AvoidEntityGoal.canUse()0.06%
                                                net.minecraft.world.level.EntityGetter.getEntitiesOfClass()0.06%
                                                    net.minecraft.world.level.Level.getEntities()0.05%
                                                        net.minecraft.world.level.entity.LevelEntityGetterAdapter.get()0.05%
                                                            net.minecraft.world.level.entity.EntitySectionStorage.getEntities()0.05%
                                                                net.minecraft.world.level.entity.EntitySectionStorage.forEachAccessibleNonEmptySection()0.05%
                                                                    net.minecraft.world.level.entity.EntitySectionStorage$$Lambda$43436/0x00000008047008f0.accept()0.03%
                                                                    it.unimi.dsi.fastutil.longs.LongAVLTreeSet$Subset.iterator()0.02%
                                                                    it.unimi.dsi.fastutil.longs.LongAVLTreeSet$SetIterator.nextLong()0.01%

Spark: https://spark.lucko.me/HGgGsOrQw9

commented

I think I'm missing something here. Where is the unnecessary overhead?