mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-06-07 19:04:48 +00:00
56 lines
1.3 KiB
Java
56 lines
1.3 KiB
Java
package net.minecraft.src;
|
|
|
|
import java.io.*;
|
|
|
|
public class Packet108EnchantItem extends Packet
|
|
{
|
|
public int windowId;
|
|
|
|
/**
|
|
* The position of the enchantment on the enchantment table window, starting with 0 as the topmost one.
|
|
*/
|
|
public int enchantment;
|
|
|
|
public Packet108EnchantItem() {}
|
|
|
|
public Packet108EnchantItem(int par1, int par2)
|
|
{
|
|
this.windowId = par1;
|
|
this.enchantment = par2;
|
|
}
|
|
|
|
/**
|
|
* Passes this Packet on to the NetHandler for processing.
|
|
*/
|
|
public void processPacket(NetHandler par1NetHandler)
|
|
{
|
|
par1NetHandler.handleEnchantItem(this);
|
|
}
|
|
|
|
/**
|
|
* Abstract. Reads the raw packet data from the data stream.
|
|
*/
|
|
public void readPacketData(DataInputStream par1DataInput) throws IOException
|
|
{
|
|
this.windowId = par1DataInput.readByte();
|
|
this.enchantment = par1DataInput.readByte();
|
|
}
|
|
|
|
/**
|
|
* Abstract. Writes the raw packet data to the data stream.
|
|
*/
|
|
public void writePacketData(DataOutputStream par1DataOutput) throws IOException
|
|
{
|
|
par1DataOutput.writeByte(this.windowId);
|
|
par1DataOutput.writeByte(this.enchantment);
|
|
}
|
|
|
|
/**
|
|
* Abstract. Return the size of the packet (not counting the header).
|
|
*/
|
|
public int getPacketSize()
|
|
{
|
|
return 2;
|
|
}
|
|
}
|