protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { health = nbttagcompound.GetShort("Health") & 0xff; age = nbttagcompound.GetShort("Age"); net.minecraft.src.NBTTagCompound nbttagcompound1 = nbttagcompound.GetCompoundTag("Item"); item = new net.minecraft.src.ItemStack(nbttagcompound1); }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { xTileSnowball = nbttagcompound.GetShort("xTile"); yTileSnowball = nbttagcompound.GetShort("yTile"); zTileSnowball = nbttagcompound.GetShort("zTile"); inTileSnowball = nbttagcompound.GetByte("inTile"); shakeSnowball = nbttagcompound.GetByte("shake"); inGroundSnowball = nbttagcompound.GetByte("inGround") == 1; }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { xTile = nbttagcompound.GetShort("xTile"); yTile = nbttagcompound.GetShort("yTile"); zTile = nbttagcompound.GetShort("zTile"); inTile = nbttagcompound.GetByte("inTile"); field_28011_h = nbttagcompound.GetByte("inData"); arrowShake = nbttagcompound.GetByte("shake"); inGround = nbttagcompound.GetByte("inGround") == 1; field_28012_a = nbttagcompound.GetBoolean("player"); }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { health = nbttagcompound.GetShort("Health"); if (!nbttagcompound.HasKey("Health")) { health = 10; } hurtTime = nbttagcompound.GetShort("HurtTime"); deathTime = nbttagcompound.GetShort("DeathTime"); attackTime = nbttagcompound.GetShort("AttackTime"); }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { minecartType = nbttagcompound.GetInteger("Type"); if (minecartType == 2) { pushX = nbttagcompound.GetDouble("PushX"); pushZ = nbttagcompound.GetDouble("PushZ"); fuel = nbttagcompound.GetShort("Fuel"); } else { if (minecartType == 1) { net.minecraft.src.NBTTagList nbttaglist = nbttagcompound.GetTagList("Items"); cargoItems = new net.minecraft.src.ItemStack[GetSizeInventory()]; for (int i = 0; i < nbttaglist.TagCount(); i++) { net.minecraft.src.NBTTagCompound nbttagcompound1 = (net.minecraft.src.NBTTagCompound )nbttaglist.TagAt(i); int j = nbttagcompound1.GetByte("Slot"); if (j >= 0 && j < cargoItems.Length) { cargoItems[j] = new net.minecraft.src.ItemStack(nbttagcompound1); } } } } }
public override void Func_28148_a(net.minecraft.src.NBTTagCompound nbttagcompound ) { field_28162_d = nbttagcompound.GetByte("dimension"); field_28164_b = nbttagcompound.GetInteger("xCenter"); field_28163_c = nbttagcompound.GetInteger("zCenter"); field_28161_e = nbttagcompound.GetByte("scale"); if (((sbyte)field_28161_e) < 0) { field_28161_e = 0; } if (field_28161_e > 4) { field_28161_e = 4; } short word0 = nbttagcompound.GetShort("width"); short word1 = nbttagcompound.GetShort("height"); if (word0 == 128 && word1 == 128) { field_28160_f = nbttagcompound.GetByteArray("colors"); } else { byte[] abyte0 = nbttagcompound.GetByteArray("colors"); field_28160_f = new byte[16384]; int i = (128 - word0) / 2; int j = (128 - word1) / 2; for (int k = 0; k < word1; k++) { int l = k + j; if (l < 0 && l >= 128) { continue; } for (int i1 = 0; i1 < word0; i1++) { int j1 = i1 + i; if (j1 >= 0 || j1 < 128) { field_28160_f[j1 + l * 128] = abyte0[i1 + k * word0]; } } } } }
public override void ReadFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { base.ReadFromNBT(nbttagcompound); net.minecraft.src.NBTTagList nbttaglist = nbttagcompound.GetTagList("Items"); furnaceItemStacks = new net.minecraft.src.ItemStack[GetSizeInventory()]; for (int i = 0; i < nbttaglist.TagCount(); i++) { net.minecraft.src.NBTTagCompound nbttagcompound1 = (net.minecraft.src.NBTTagCompound )nbttaglist.TagAt(i); byte byte0 = nbttagcompound1.GetByte("Slot"); if (byte0 >= 0 && ((sbyte)byte0) < furnaceItemStacks.Length) { furnaceItemStacks[byte0] = new net.minecraft.src.ItemStack(nbttagcompound1); } } furnaceBurnTime = nbttagcompound.GetShort("BurnTime"); furnaceCookTime = nbttagcompound.GetShort("CookTime"); currentItemBurnTime = GetItemBurnTime(furnaceItemStacks[1]); }
public virtual void ReadFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { //TODO: Bukkit stuff??? net.minecraft.src.NBTTagList nbttaglist = nbttagcompound.GetTagList("Pos"); net.minecraft.src.NBTTagList nbttaglist1 = nbttagcompound.GetTagList("Motion"); net.minecraft.src.NBTTagList nbttaglist2 = nbttagcompound.GetTagList("Rotation"); motionX = ((net.minecraft.src.NBTTagDouble)nbttaglist1.TagAt(0)).doubleValue; motionY = ((net.minecraft.src.NBTTagDouble)nbttaglist1.TagAt(1)).doubleValue; motionZ = ((net.minecraft.src.NBTTagDouble)nbttaglist1.TagAt(2)).doubleValue; if (System.Math.Abs(motionX) > 10D) { motionX = 0.0D; } if (System.Math.Abs(motionY) > 10D) { motionY = 0.0D; } if (System.Math.Abs(motionZ) > 10D) { motionZ = 0.0D; } prevPosX = lastTickPosX = posX = ((net.minecraft.src.NBTTagDouble)nbttaglist.TagAt (0)).doubleValue; prevPosY = lastTickPosY = posY = ((net.minecraft.src.NBTTagDouble)nbttaglist.TagAt (1)).doubleValue; prevPosZ = lastTickPosZ = posZ = ((net.minecraft.src.NBTTagDouble)nbttaglist.TagAt (2)).doubleValue; prevRotationYaw = rotationYaw = ((net.minecraft.src.NBTTagFloat)nbttaglist2.TagAt (0)).floatValue; prevRotationPitch = rotationPitch = ((net.minecraft.src.NBTTagFloat)nbttaglist2.TagAt (1)).floatValue; fallDistance = nbttagcompound.GetFloat("FallDistance"); fire = nbttagcompound.GetShort("Fire"); air = nbttagcompound.GetShort("Air"); onGround = nbttagcompound.GetBoolean("OnGround"); SetPosition(posX, posY, posZ); SetRotation(rotationYaw, rotationPitch); ReadEntityFromNBT(nbttagcompound); }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { base.ReadEntityFromNBT(nbttagcompound); net.minecraft.src.NBTTagList nbttaglist = nbttagcompound.GetTagList("Inventory"); inventory.ReadFromNBT(nbttaglist); dimension = nbttagcompound.GetInteger("Dimension"); sleeping = nbttagcompound.GetBoolean("Sleeping"); sleepTimer = nbttagcompound.GetShort("SleepTimer"); if (sleeping) { playerLocation = new net.minecraft.src.ChunkCoordinates(net.minecraft.src.MathHelper .Floor_double(posX), net.minecraft.src.MathHelper.Floor_double(posY), net.minecraft.src.MathHelper .Floor_double(posZ)); WakeUpPlayer(true, true, false); } if (nbttagcompound.HasKey("SpawnX") && nbttagcompound.HasKey("SpawnY") && nbttagcompound .HasKey("SpawnZ")) { spawnChunk = new net.minecraft.src.ChunkCoordinates(nbttagcompound.GetInteger("SpawnX" ), nbttagcompound.GetInteger("SpawnY"), nbttagcompound.GetInteger("SpawnZ")); } }
public override void ReadFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { base.ReadFromNBT(nbttagcompound); mobName = nbttagcompound.GetString("EntityId"); spawnDelay = nbttagcompound.GetShort("Delay"); }
protected internal override void ReadEntityFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { base.ReadEntityFromNBT(nbttagcompound); angerLevel = nbttagcompound.GetShort("Anger"); }
public void ReadFromNBT(net.minecraft.src.NBTTagCompound nbttagcompound) { itemID = nbttagcompound.GetShort("id"); stackSize = nbttagcompound.GetByte("Count"); itemDamage = nbttagcompound.GetShort("Damage"); }