本文整理汇总了Java中net.minecraft.tileentity.MobSpawnerBaseLogic.WeightedRandomMinecart方法的典型用法代码示例。如果您正苦于以下问题:Java MobSpawnerBaseLogic.WeightedRandomMinecart方法的具体用法?Java MobSpawnerBaseLogic.WeightedRandomMinecart怎么用?Java MobSpawnerBaseLogic.WeightedRandomMinecart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.tileentity.MobSpawnerBaseLogic
的用法示例。
在下文中一共展示了MobSpawnerBaseLogic.WeightedRandomMinecart方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeToNBT
import net.minecraft.tileentity.MobSpawnerBaseLogic; //导入方法依赖的package包/类
public void writeToNBT(NBTTagCompound p_98280_1_)
{
p_98280_1_.setString("EntityId", this.getEntityNameToSpawn());
p_98280_1_.setShort("Delay", (short)this.spawnDelay);
p_98280_1_.setShort("MinSpawnDelay", (short)this.minSpawnDelay);
p_98280_1_.setShort("MaxSpawnDelay", (short)this.maxSpawnDelay);
p_98280_1_.setShort("SpawnCount", (short)this.spawnCount);
p_98280_1_.setShort("MaxNearbyEntities", (short)this.maxNearbyEntities);
p_98280_1_.setShort("RequiredPlayerRange", (short)this.activatingRangeFromPlayer);
p_98280_1_.setShort("SpawnRange", (short)this.spawnRange);
if (this.getRandomEntity() != null)
{
p_98280_1_.setTag("SpawnData", this.getRandomEntity().field_98222_b.copy());
}
if (this.getRandomEntity() != null || this.potentialEntitySpawns != null && this.potentialEntitySpawns.size() > 0)
{
NBTTagList nbttaglist = new NBTTagList();
if (this.potentialEntitySpawns != null && this.potentialEntitySpawns.size() > 0)
{
Iterator iterator = this.potentialEntitySpawns.iterator();
while (iterator.hasNext())
{
MobSpawnerBaseLogic.WeightedRandomMinecart weightedrandomminecart = (MobSpawnerBaseLogic.WeightedRandomMinecart)iterator.next();
nbttaglist.appendTag(weightedrandomminecart.func_98220_a());
}
}
else
{
nbttaglist.appendTag(this.getRandomEntity().func_98220_a());
}
p_98280_1_.setTag("SpawnPotentials", nbttaglist);
}
}
示例2: setRandomEntity
import net.minecraft.tileentity.MobSpawnerBaseLogic; //导入方法依赖的package包/类
public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_)
{
super.setRandomEntity(p_98277_1_);
if (this.getSpawnerWorld() != null)
{
this.getSpawnerWorld().markBlockForUpdate(TileEntityBombySpawner.this.xCoord, TileEntityBombySpawner.this.yCoord, TileEntityBombySpawner.this.zCoord);
}
}
示例3: writeToNBT
import net.minecraft.tileentity.MobSpawnerBaseLogic; //导入方法依赖的package包/类
public void writeToNBT(NBTTagCompound p_98280_1_)
{
//p_98280_1_.setString("EntityId", this.getEntityNameToSpawn());
p_98280_1_.setShort("Delay", (short)this.spawnDelay);
p_98280_1_.setShort("MinSpawnDelay", (short)this.minSpawnDelay);
p_98280_1_.setShort("MaxSpawnDelay", (short)this.maxSpawnDelay);
p_98280_1_.setShort("SpawnCount", (short)this.spawnCount);
p_98280_1_.setShort("MaxNearbyEntities", (short)this.maxNearbyEntities);
p_98280_1_.setShort("RequiredPlayerRange", (short)this.activatingRangeFromPlayer);
p_98280_1_.setShort("SpawnRange", (short)this.spawnRange);
if (this.getRandomEntity() != null)
{
p_98280_1_.setTag("SpawnData", this.getRandomEntity().field_98222_b.copy());
}
if (this.getRandomEntity() != null || this.potentialEntitySpawns != null && this.potentialEntitySpawns.size() > 0)
{
NBTTagList nbttaglist = new NBTTagList();
if (this.potentialEntitySpawns != null && this.potentialEntitySpawns.size() > 0)
{
Iterator iterator = this.potentialEntitySpawns.iterator();
while (iterator.hasNext())
{
MobSpawnerBaseLogic.WeightedRandomMinecart weightedrandomminecart = (MobSpawnerBaseLogic.WeightedRandomMinecart)iterator.next();
nbttaglist.appendTag(weightedrandomminecart.func_98220_a());
}
}
else
{
nbttaglist.appendTag(this.getRandomEntity().func_98220_a());
}
p_98280_1_.setTag("SpawnPotentials", nbttaglist);
}
}
示例4: setRandomEntity
import net.minecraft.tileentity.MobSpawnerBaseLogic; //导入方法依赖的package包/类
public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_)
{
this.randomEntity = p_98277_1_;
}