C# Class Craft.Net.Server.Slot

Represents an inventory slot.
Exibir arquivo Open project: ags131/SharpMinecraftLibrary Class Usage Examples

Public Properties

Property Type Description
Count byte
Id short
Metadata short
Nbt LibNbt.NbtFile

Public Methods

Method Description
ReadSlot ( Stream stream ) : Slot

Reads a slot from the given stream.

Slot ( ) : System

Initializes a new instance of the Slot class.

Slot ( short ID, byte Count ) : System

Initializes a new instance of the Slot class.

Slot ( short ID, byte Count, short Metadata ) : System

Initializes a new instance of the Slot class.

WriteSlot ( Stream stream ) : void
WriteSlot ( Stream stream, Slot s ) : void

Private Methods

Method Description
ReadShort ( Stream stream ) : short

Gets the slot data.

Gets the slot data.

WriteShort ( Stream stream, short value ) : void

Method Details

ReadSlot() public static method

Reads a slot from the given stream.
public static ReadSlot ( Stream stream ) : Slot
stream Stream The stream to read from.
return Slot

Slot() public method

Initializes a new instance of the Slot class.
public Slot ( ) : System
return System

Slot() public method

Initializes a new instance of the Slot class.
public Slot ( short ID, byte Count ) : System
ID short The ID.
Count byte The count.
return System

Slot() public method

Initializes a new instance of the Slot class.
public Slot ( short ID, byte Count, short Metadata ) : System
ID short The ID.
Count byte The count.
Metadata short The metadata.
return System

WriteSlot() public method

public WriteSlot ( Stream stream ) : void
stream Stream
return void

WriteSlot() public static method

public static WriteSlot ( Stream stream, Slot s ) : void
stream Stream
s Slot
return void

Property Details

Count public_oe property

Gets or sets the item count.
public byte Count
return byte

Id public_oe property

Gets or sets the item ID.
This ID may be a block or an item.
public short Id
return short

Metadata public_oe property

Gets or sets the item metadata.
public short Metadata
return short

Nbt public_oe property

Gets or sets the NBT data.
This is used for enchanting equipment
public NbtFile,LibNbt Nbt
return LibNbt.NbtFile