コード例 #1
0
 /** Writes a tile entity to NBT. */
 public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setShort("typeID", (short) TypeID);
   par1NBTTagCompound.setByte("metaID", MetaID);
   par1NBTTagCompound.setByte("material", material);
   par1NBTTagCompound.setLong("extraData", extraData);
 }
コード例 #2
0
  /** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setString("EntityId", mobID);
    par1NBTTagCompound.setShort("Delay", (short) delay);
    par1NBTTagCompound.setShort("MinSpawnDelay", (short) field_70388_f);
    par1NBTTagCompound.setShort("MaxSpawnDelay", (short) field_70389_g);
    par1NBTTagCompound.setShort("SpawnCount", (short) field_70395_h);

    if (field_70391_e != null) {
      par1NBTTagCompound.setCompoundTag("SpawnData", field_70391_e);
    }
  }
コード例 #3
0
 @Override
 public void writeToNBT(NBTTagCompound nbt) {
   super.writeToNBT(nbt);
   nbt.setInteger("CurrentPokeball", currentPokeball);
   nbt.setInteger("CurrentFossil", currentFossil);
   nbt.setInteger("CompletionRate", completionRate);
   nbt.setFloat("PokemonProgress", pokemonProgress);
   nbt.setFloat("FossilProgress", fossilProgress);
   nbt.setString("CurrentPokemonTexture", currentPokeballTexture);
   nbt.setString("CurrentPokemon", currentPokemon);
   nbt.setBoolean("PokemonOccupied", pokemonOccupied);
 }
コード例 #4
0
ファイル: TileGenericPipe.java プロジェクト: Xfel/BuildCraft
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    if (pipe != null) {
      nbttagcompound.setInteger("pipeId", pipe.itemID);
      pipe.writeToNBT(nbttagcompound);
    } else nbttagcompound.setInteger("pipeId", coreState.pipeId);

    for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
      nbttagcompound.setInteger("facadeBlocks[" + i + "]", facadeBlocks[i]);
      nbttagcompound.setInteger("facadeMeta[" + i + "]", facadeMeta[i]);
    }
  }
コード例 #5
0
ファイル: TileGenericPipe.java プロジェクト: voe/BuildCraft
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    if (pipe != null) {
      nbttagcompound.setInteger("pipeId", pipe.itemID);
      pipe.writeToNBT(nbttagcompound);
    } else nbttagcompound.setInteger("pipeId", key);

    for (int i = 0; i < Orientations.dirs().length; i++) {
      nbttagcompound.setInteger("facadeBlocks[" + i + "]", facadeBlocks[i]);
      nbttagcompound.setInteger("facadeMeta[" + i + "]", facadeMeta[i]);
    }
  }
コード例 #6
0
 @Override
 public void writeToNBT(NBTTagCompound compound) {
   super.writeToNBT(compound);
   NBTTagList list = new NBTTagList();
   for (int i = 0; i < contents.length; i++) {
     if (contents[i] == null) continue;
     NBTTagCompound item = new NBTTagCompound();
     item.setByte("Slot", (byte) i);
     contents[i].writeToNBT(item);
     list.appendTag(item);
   }
   compound.setTag("Items", list);
   if (lock != null) compound.setCompoundTag("lock", lock.writeToNBT(new NBTTagCompound("")));
 }
コード例 #7
0
  /** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    NBTTagList var2 = new NBTTagList();

    for (int var3 = 0; var3 < this.poubelleContents.length; ++var3) {
      if (this.poubelleContents[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        this.poubelleContents[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }

    par1NBTTagCompound.setTag("Items", var2);
  }
コード例 #8
0
 @Override
 public void writeToNBT(NBTTagCompound ntc) {
   super.writeToNBT(ntc);
   ntc.setInteger("grindingTicks", this.grindingTicks);
   NBTTagList list = new NBTTagList();
   for (int i = 0; i < inv.length; ++i) {
     if (this.inv[i] != null) {
       NBTTagCompound ntc2 = new NBTTagCompound();
       ntc2.setByte("Slot", (byte) i);
       this.inv[i].writeToNBT(ntc2);
       list.appendTag(ntc2);
     }
   }
   ntc.setTag("Items", list);
 }
コード例 #9
0
  /** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setString("EntityId", this.mobID);
    par1NBTTagCompound.setShort("Delay", (short) this.delay);
    par1NBTTagCompound.setShort("MinSpawnDelay", (short) this.minSpawnDelay);
    par1NBTTagCompound.setShort("MaxSpawnDelay", (short) this.maxSpawnDelay);
    par1NBTTagCompound.setShort("SpawnCount", (short) this.spawnCount);
    par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.field_82350_j);
    par1NBTTagCompound.setShort("RequiredPlayerRange", (short) this.field_82349_r);
    par1NBTTagCompound.setShort("SpawnRange", (short) this.field_82348_s);

    if (this.spawnerTags != null) {
      par1NBTTagCompound.setCompoundTag("SpawnData", this.spawnerTags);
    }
  }
コード例 #10
0
  /** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setShort("BurnTime", (short) this.freezerBurnTime);
    par1NBTTagCompound.setShort("CookTime", (short) this.freezerCookTime);
    NBTTagList var2 = new NBTTagList();

    for (int var3 = 0; var3 < this.freezerItemStacks.length; ++var3) {
      if (this.freezerItemStacks[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        this.freezerItemStacks[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }

    par1NBTTagCompound.setTag("Items", var2);
  }
コード例 #11
0
  /** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setShort("BrewTime", (short) this.brewTime);
    NBTTagList var2 = new NBTTagList();

    for (int var3 = 0; var3 < this.brewingItemStacks.length; ++var3) {
      if (this.brewingItemStacks[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        this.brewingItemStacks[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }

    par1NBTTagCompound.setTag("Items", var2);

    if (this.isInvNameLocalized()) {
      par1NBTTagCompound.setString("CustomName", this.field_94132_e);
    }
  }
コード例 #12
0
 public void writeToNBT(NBTTagCompound nbttagcompound) {
   super.writeToNBT(nbttagcompound);
   nbttagcompound.setShort("facing", facing);
 }
コード例 #13
0
 @Override
 public void writeToNBT(NBTTagCompound nbt) {
   super.writeToNBT(nbt);
   nbt.setLong("size", size);
   nbt.setBoolean("zapped", zapped);
 }
コード例 #14
0
ファイル: TileEntityBeacon.java プロジェクト: Eladkay/mc-dev
 /** Writes a tile entity to NBT. */
 public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setInteger("Primary", this.primaryEffect);
   par1NBTTagCompound.setInteger("Secondary", this.secondaryEffect);
   par1NBTTagCompound.setInteger("Levels", this.levels);
 }
コード例 #15
0
 /** Writes a tile entity to NBT. */
 public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setString("Command", this.command);
   par1NBTTagCompound.setInteger("SuccessCount", this.succesCount);
   par1NBTTagCompound.setString("CustomName", this.commandSenderName);
 }