本文整理汇总了Java中net.minecraft.world.chunk.Chunk.setHasEntities方法的典型用法代码示例。如果您正苦于以下问题:Java Chunk.setHasEntities方法的具体用法?Java Chunk.setHasEntities怎么用?Java Chunk.setHasEntities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.chunk.Chunk
的用法示例。
在下文中一共展示了Chunk.setHasEntities方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findFieldHasEntities
import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private static Field findFieldHasEntities(Chunk p_findFieldHasEntities_0_)
{
try
{
List list = new ArrayList();
List list1 = new ArrayList();
Field[] afield = Chunk.class.getDeclaredFields();
for (int i = 0; i < afield.length; ++i)
{
Field field = afield[i];
if (field.getType() == Boolean.TYPE)
{
field.setAccessible(true);
list.add(field);
list1.add(field.get(p_findFieldHasEntities_0_));
}
}
p_findFieldHasEntities_0_.setHasEntities(false);
List list2 = new ArrayList();
for (Object field1 : list)
{
list2.add(((Field)field1).get(p_findFieldHasEntities_0_));
}
p_findFieldHasEntities_0_.setHasEntities(true);
List list3 = new ArrayList();
for (Object field2 : list)
{
list3.add(((Field)field2).get(p_findFieldHasEntities_0_));
}
List list4 = new ArrayList();
for (int j = 0; j < ((List)list).size(); ++j)
{
Field field3 = (Field)list.get(j);
Boolean obool = (Boolean)list2.get(j);
Boolean obool1 = (Boolean)list3.get(j);
if (!obool.booleanValue() && obool1.booleanValue())
{
list4.add(field3);
Boolean obool2 = (Boolean)list1.get(j);
field3.set(p_findFieldHasEntities_0_, obool2);
}
}
if (list4.size() == 1)
{
Field field4 = (Field)list4.get(0);
return field4;
}
}
catch (Exception exception)
{
Config.warn(exception.getClass().getName() + " " + exception.getMessage());
}
Config.warn("Error finding Chunk.hasEntities");
return null;
}
示例2: fildFieldHasEntities
import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private static Field fildFieldHasEntities(Chunk p_fildFieldHasEntities_0_)
{
try
{
List list = new ArrayList();
List list1 = new ArrayList();
Field[] afield = Chunk.class.getDeclaredFields();
for (int i = 0; i < afield.length; ++i)
{
Field field = afield[i];
if (field.getType() == Boolean.TYPE)
{
field.setAccessible(true);
list.add(field);
list1.add(field.get(p_fildFieldHasEntities_0_));
}
}
p_fildFieldHasEntities_0_.setHasEntities(false);
List list2 = new ArrayList();
for (Object field1 : list)
{
list2.add(((Field) field1).get(p_fildFieldHasEntities_0_));
}
p_fildFieldHasEntities_0_.setHasEntities(true);
List list3 = new ArrayList();
for (Object field2 : list)
{
list3.add(((Field) field2).get(p_fildFieldHasEntities_0_));
}
List list4 = new ArrayList();
for (int j = 0; j < ((List)list).size(); ++j)
{
Field field3 = (Field)list.get(j);
Boolean obool = (Boolean)list2.get(j);
Boolean obool1 = (Boolean)list3.get(j);
if (!obool.booleanValue() && obool1.booleanValue())
{
list4.add(field3);
Boolean obool2 = (Boolean)list1.get(j);
field3.set(p_fildFieldHasEntities_0_, obool2);
}
}
if (list4.size() == 1)
{
Field field4 = (Field)list4.get(0);
return field4;
}
}
catch (Exception exception)
{
Config.warn(exception.getClass().getName() + " " + exception.getMessage());
}
Config.warn("Error finding Chunk.hasEntities");
return null;
}
示例3: findFieldHasEntities
import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private static ReflectorField findFieldHasEntities(Chunk p_findFieldHasEntities_0_)
{
try
{
List list = new ArrayList();
List list1 = new ArrayList();
Field[] afield = Chunk.class.getDeclaredFields();
for (int i = 0; i < afield.length; ++i)
{
Field field = afield[i];
if (field.getType() == Boolean.TYPE)
{
field.setAccessible(true);
list.add(field);
list1.add(field.get(p_findFieldHasEntities_0_));
}
}
p_findFieldHasEntities_0_.setHasEntities(false);
List list2 = new ArrayList();
for (Object field1 : list)
{
list2.add(((Field) field1).get(p_findFieldHasEntities_0_));
}
p_findFieldHasEntities_0_.setHasEntities(true);
List list3 = new ArrayList();
for (Object field2 : list)
{
list3.add(((Field) field2).get(p_findFieldHasEntities_0_));
}
List list4 = new ArrayList();
for (int j = 0; j < ((List)list).size(); ++j)
{
Field field3 = (Field)list.get(j);
Boolean obool = (Boolean)list2.get(j);
Boolean obool1 = (Boolean)list3.get(j);
if (!obool.booleanValue() && obool1.booleanValue())
{
list4.add(field3);
Boolean obool2 = (Boolean)list1.get(j);
field3.set(p_findFieldHasEntities_0_, obool2);
}
}
if (list4.size() == 1)
{
Field field4 = (Field)list4.get(0);
return new ReflectorField(field4);
}
}
catch (Exception exception)
{
Config.warn(exception.getClass().getName() + " " + exception.getMessage());
}
Config.warn("Error finding Chunk.hasEntities");
return new ReflectorField(new ReflectorClass(Chunk.class), "hasEntities");
}
示例4: loadEntities
import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public void loadEntities(World worldIn, NBTTagCompound compound, Chunk chunk)
{
NBTTagList nbttaglist1 = compound.getTagList("Entities", 10);
if (nbttaglist1 != null)
{
for (int j1 = 0; j1 < nbttaglist1.tagCount(); ++j1)
{
NBTTagCompound nbttagcompound1 = nbttaglist1.getCompoundTagAt(j1);
readChunkEntity(nbttagcompound1, worldIn, chunk);
chunk.setHasEntities(true);
}
}
NBTTagList nbttaglist2 = compound.getTagList("TileEntities", 10);
if (nbttaglist2 != null)
{
for (int k1 = 0; k1 < nbttaglist2.tagCount(); ++k1)
{
NBTTagCompound nbttagcompound2 = nbttaglist2.getCompoundTagAt(k1);
TileEntity tileentity = TileEntity.create(worldIn, nbttagcompound2);
if (tileentity != null)
{
chunk.addTileEntity(tileentity);
}
}
}
if (compound.hasKey("TileTicks", 9))
{
NBTTagList nbttaglist3 = compound.getTagList("TileTicks", 10);
if (nbttaglist3 != null)
{
for (int l1 = 0; l1 < nbttaglist3.tagCount(); ++l1)
{
NBTTagCompound nbttagcompound3 = nbttaglist3.getCompoundTagAt(l1);
Block block;
if (nbttagcompound3.hasKey("i", 8))
{
block = Block.getBlockFromName(nbttagcompound3.getString("i"));
}
else
{
block = Block.getBlockById(nbttagcompound3.getInteger("i"));
}
worldIn.scheduleBlockUpdate(new BlockPos(nbttagcompound3.getInteger("x"), nbttagcompound3.getInteger("y"), nbttagcompound3.getInteger("z")), block, nbttagcompound3.getInteger("t"), nbttagcompound3.getInteger("p"));
}
}
}
}