/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.mobID = par1NBTTagCompound.getString("EntityId"); this.delay = par1NBTTagCompound.getShort("Delay"); if (par1NBTTagCompound.hasKey("SpawnData")) { this.spawnerTags = par1NBTTagCompound.getCompoundTag("SpawnData"); } else { this.spawnerTags = null; } if (par1NBTTagCompound.hasKey("MinSpawnDelay")) { this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay"); this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay"); this.spawnCount = par1NBTTagCompound.getShort("SpawnCount"); } if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) { this.field_82350_j = par1NBTTagCompound.getShort("MaxNearbyEntities"); this.field_82349_r = par1NBTTagCompound.getShort("RequiredPlayerRange"); } if (par1NBTTagCompound.hasKey("SpawnRange")) { this.field_82348_s = par1NBTTagCompound.getShort("SpawnRange"); } }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); MetaID = par1NBTTagCompound.getByte("metaID"); TypeID = par1NBTTagCompound.getShort("typeID"); material = par1NBTTagCompound.getByte("material"); extraData = par1NBTTagCompound.getLong("extraData"); }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.command = par1NBTTagCompound.getString("Command"); this.succesCount = par1NBTTagCompound.getInteger("SuccessCount"); if (par1NBTTagCompound.hasKey("CustomName")) { this.commandSenderName = par1NBTTagCompound.getString("CustomName"); } }
@Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); currentPokeball = nbt.getInteger("CurrentPokeball"); currentFossil = nbt.getInteger("CurrentFossil"); completionRate = nbt.getInteger("CompletionRate"); fossilProgress = nbt.getFloat("FossilProgress"); pokemonProgress = nbt.getFloat("PokemonProgress"); currentPokeballTexture = nbt.getString("CurrentPokemonTexture"); currentPokemon = nbt.getString("CurrentPokemon"); pokemonOccupied = nbt.getBoolean("PokemonOccupied"); }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.poubelleContents = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3); int var5 = var4.getByte("Slot") & 255; if (var5 >= 0 && var5 < this.poubelleContents.length) { this.poubelleContents[var5] = ItemStack.loadItemStackFromNBT(var4); } } }
@Override public void readFromNBT(NBTTagCompound ntc) { super.readFromNBT(ntc); this.grindingTicks = ntc.getInteger("grindingTicks"); NBTTagList list = ntc.getTagList("Items"); this.inv = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < list.tagCount(); ++i) { NBTTagCompound ntc2 = (NBTTagCompound) list.tagAt(i); byte b = ntc2.getByte("Slot"); if ((b >= 0) && (b < this.inv.length)) { this.inv[b] = ItemStack.loadItemStackFromNBT(ntc2); } } }
@Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); NBTTagList items = compound.getTagList("Items"); contents = new ItemStack[getSizeInventory()]; for (int i = 0; i < items.tagCount(); i++) { NBTTagCompound item = (NBTTagCompound) items.tagAt(i); int slot = item.getByte("Slot") & 255; if (slot >= 0 && slot < contents.length) contents[slot] = ItemStack.loadItemStackFromNBT(item); } if (compound.hasKey("lock")) lock = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("lock")); }
@Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); key = nbttagcompound.getInteger("pipeId"); pipe = BlockGenericPipe.createPipe(key); if (pipe != null) { pipe.readFromNBT(nbttagcompound); } for (int i = 0; i < Orientations.dirs().length; i++) { facadeBlocks[i] = nbttagcompound.getInteger("facadeBlocks[" + i + "]"); facadeMeta[i] = nbttagcompound.getInteger("facadeMeta[" + i + "]"); } }
@Override public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); coreState.pipeId = nbttagcompound.getInteger("pipeId"); pipe = BlockGenericPipe.createPipe(coreState.pipeId); if (pipe != null) { pipe.readFromNBT(nbttagcompound); } for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { facadeBlocks[i] = nbttagcompound.getInteger("facadeBlocks[" + i + "]"); facadeMeta[i] = nbttagcompound.getInteger("facadeMeta[" + i + "]"); } }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); mobID = par1NBTTagCompound.getString("EntityId"); delay = par1NBTTagCompound.getShort("Delay"); if (par1NBTTagCompound.hasKey("SpawnData")) { field_70391_e = par1NBTTagCompound.getCompoundTag("SpawnData"); } else { field_70391_e = null; } if (par1NBTTagCompound.hasKey("MinSpawnDelay")) { field_70388_f = par1NBTTagCompound.getShort("MinSpawnDelay"); field_70389_g = par1NBTTagCompound.getShort("MaxSpawnDelay"); field_70395_h = par1NBTTagCompound.getShort("SpawnCount"); } }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.freezerItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3); byte var5 = var4.getByte("Slot"); if (var5 >= 0 && var5 < this.freezerItemStacks.length) { this.freezerItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4); } } this.freezerBurnTime = par1NBTTagCompound.getShort("BurnTime"); this.freezerCookTime = par1NBTTagCompound.getShort("CookTime"); this.freezercurrentItemBurnTime = getItemBurnTime(this.freezerItemStacks[1]); }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.brewingItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3); byte var5 = var4.getByte("Slot"); if (var5 >= 0 && var5 < this.brewingItemStacks.length) { this.brewingItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4); } } this.brewTime = par1NBTTagCompound.getShort("BrewTime"); if (par1NBTTagCompound.hasKey("CustomName")) { this.field_94132_e = par1NBTTagCompound.getString("CustomName"); } }
public static TileEntity createAndLoadEntity(NBTTagCompound nbttagcompound) { TileEntity tileentity = null; try { Class class1 = (Class) nameToClassMap.get(nbttagcompound.getString("id")); if (class1 != null) { tileentity = (TileEntity) class1.newInstance(); } } catch (Exception exception) { exception.printStackTrace(); } if (tileentity != null) { tileentity.readFromNBT(nbttagcompound); } else { System.out.println( (new StringBuilder()) .append("Skipping TileEntity with id ") .append(nbttagcompound.getString("id")) .toString()); } return tileentity; }
/** Creates a new entity and loads its data from the specified NBT. */ public static TileEntity createAndLoadEntity(NBTTagCompound par0NBTTagCompound) { TileEntity var1 = null; try { Class var2 = (Class) nameToClassMap.get(par0NBTTagCompound.getString("id")); if (var2 != null) { var1 = (TileEntity) var2.newInstance(); } } catch (Exception var3) { var3.printStackTrace(); } if (var1 != null) { var1.readFromNBT(par0NBTTagCompound); } else { MinecraftServer.getServer() .getLogAgent() .func_98236_b("Skipping TileEntity with id " + par0NBTTagCompound.getString("id")); } return var1; }
@Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); size = nbt.getLong("size"); zapped = nbt.getBoolean("zapped"); }
public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); prevFacing = facing = nbttagcompound.getShort("facing"); }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.primaryEffect = par1NBTTagCompound.getInteger("Primary"); this.secondaryEffect = par1NBTTagCompound.getInteger("Secondary"); this.levels = par1NBTTagCompound.getInteger("Levels"); }