本文整理汇总了Java中net.minecraft.world.World.getLoadedEntityList方法的典型用法代码示例。如果您正苦于以下问题:Java World.getLoadedEntityList方法的具体用法?Java World.getLoadedEntityList怎么用?Java World.getLoadedEntityList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.World
的用法示例。
在下文中一共展示了World.getLoadedEntityList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: worldChanged
import net.minecraft.world.World; //导入方法依赖的package包/类
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_);
}
}
}
示例2: updateMapDynamicLights
import net.minecraft.world.World; //导入方法依赖的package包/类
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_);
}
}
}
}
}
示例3: worldChanged
import net.minecraft.world.World; //导入方法依赖的package包/类
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);
}
}
}
示例4: updateMapDynamicLights
import net.minecraft.world.World; //导入方法依赖的package包/类
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_);
}
}
}
}
}