当前位置: 首页>>代码示例>>Java>>正文


Java MobSpawnerBaseLogic.WeightedRandomMinecart方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:39,代码来源:BombySpawnerBaseLogic.java

示例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);
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:10,代码来源:TileEntityBombySpawner.java

示例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);
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:39,代码来源:Fred2_0SpawnerBaseLogic.java

示例4: setRandomEntity

import net.minecraft.tileentity.MobSpawnerBaseLogic; //导入方法依赖的package包/类
public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_)
{
    this.randomEntity = p_98277_1_;
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:5,代码来源:BombySpawnerBaseLogic.java


注:本文中的net.minecraft.tileentity.MobSpawnerBaseLogic.WeightedRandomMinecart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。