Java Code Examples for net.minecraft.world.World.getLoadedEntityList()

The following are Jave code examples for showing how to use getLoadedEntityList() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: RandomMobs.java   Source Code and License Vote up 5 votes
public static void worldChanged(World p_worldChanged_0_, World p_worldChanged_1_)
{
    if (p_worldChanged_1_ != null)
    {
        List list = p_worldChanged_1_.getLoadedEntityList();

        for (int i = 0; i < list.size(); ++i)
        {
            Entity entity = (Entity)list.get(i);
            entityLoaded(entity, p_worldChanged_1_);
        }
    }
}
 
Example 2
Project: BaseClient   File: DynamicLights.java   Source Code and License Vote up 5 votes
private static void updateMapDynamicLights(RenderGlobal p_updateMapDynamicLights_0_)
{
    World world = p_updateMapDynamicLights_0_.getWorld();

    if (world != null)
    {
        for (Entity entity : world.getLoadedEntityList())
        {
            int i = getLightLevel(entity);

            if (i > 0)
            {
                Integer integer = IntegerCache.valueOf(entity.getEntityId());
                DynamicLight dynamiclight = (DynamicLight)mapDynamicLights.get(integer);

                if (dynamiclight == null)
                {
                    dynamiclight = new DynamicLight(entity);
                    mapDynamicLights.put(integer, dynamiclight);
                }
            }
            else
            {
                Integer integer1 = IntegerCache.valueOf(entity.getEntityId());
                DynamicLight dynamiclight1 = (DynamicLight)mapDynamicLights.remove(integer1);

                if (dynamiclight1 != null)
                {
                    dynamiclight1.updateLitChunks(p_updateMapDynamicLights_0_);
                }
            }
        }
    }
}
 
Example 3
Project: BaseClient   File: RandomMobs.java   Source Code and License Vote up 5 votes
public static void worldChanged(World p_worldChanged_0_, World p_worldChanged_1_)
{
    if (p_worldChanged_1_ != null)
    {
        List list = p_worldChanged_1_.getLoadedEntityList();

        for (int i = 0; i < list.size(); ++i)
        {
            Entity entity = (Entity)list.get(i);
            entityLoaded(entity);
        }
    }
}
 
Example 4
Project: Backmemed   File: RandomMobs.java   Source Code and License Vote up 5 votes
public static void worldChanged(World p_worldChanged_0_, World p_worldChanged_1_)
{
    if (p_worldChanged_1_ != null)
    {
        List list = p_worldChanged_1_.getLoadedEntityList();

        for (int i = 0; i < list.size(); ++i)
        {
            Entity entity = (Entity)list.get(i);
            entityLoaded(entity, p_worldChanged_1_);
        }
    }
}
 
Example 5
Project: Backmemed   File: DynamicLights.java   Source Code and License Vote up 5 votes
private static void updateMapDynamicLights(RenderGlobal p_updateMapDynamicLights_0_)
{
    World world = p_updateMapDynamicLights_0_.getWorld();

    if (world != null)
    {
        for (Entity entity : world.getLoadedEntityList())
        {
            int i = getLightLevel(entity);

            if (i > 0)
            {
                Integer integer = net.minecraft.util.IntegerCache.getInteger(entity.getEntityId());
                DynamicLight dynamiclight = (DynamicLight)mapDynamicLights.get(integer);

                if (dynamiclight == null)
                {
                    dynamiclight = new DynamicLight(entity);
                    mapDynamicLights.put(integer, dynamiclight);
                }
            }
            else
            {
                Integer integer1 = net.minecraft.util.IntegerCache.getInteger(entity.getEntityId());
                DynamicLight dynamiclight1 = (DynamicLight)mapDynamicLights.remove(integer1);

                if (dynamiclight1 != null)
                {
                    dynamiclight1.updateLitChunks(p_updateMapDynamicLights_0_);
                }
            }
        }
    }
}