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); } } } } }