本文整理匯總了Java中cpw.mods.fml.common.network.PacketDispatcher.getPacket方法的典型用法代碼示例。如果您正苦於以下問題:Java PacketDispatcher.getPacket方法的具體用法?Java PacketDispatcher.getPacket怎麽用?Java PacketDispatcher.getPacket使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cpw.mods.fml.common.network.PacketDispatcher
的用法示例。
在下文中一共展示了PacketDispatcher.getPacket方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket()
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte( getPacketId() );
write( out );
return PacketDispatcher.getPacket( ModMetadata.CHANNEL_NAME,
out.toByteArray() );
}
示例2: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket()
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(Reference.CHANNEL_NAME,
out.toByteArray());
}
示例3: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket() throws IllegalArgumentException {
if (PaleoPacketHandler.CHANNEL_NAME != null) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(PaleoPacketHandler.CHANNEL_NAME,
out.toByteArray());
}
throw new IllegalArgumentException(
"You have to define a channel for the PowerGrid packets first!");
}
示例4: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket() {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(PowerGrid.CHANNEL_NAME,
out.toByteArray());
}
示例5: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket()
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(CHANNEL, out.toByteArray());
}
示例6: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket() {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(Dota2Items.CHANNEL, out.toByteArray());
}
示例7: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket() {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(CHANNEL, out.toByteArray());
}
示例8: makePacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public final Packet makePacket() {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(Reference.PACKETCHANNEL_GT, out.toByteArray());
}
示例9: makeNBTPacket
import cpw.mods.fml.common.network.PacketDispatcher; //導入方法依賴的package包/類
public static Packet makeNBTPacket(String channel, NBTTagCompound nbtTagCompound)
{
return PacketDispatcher.getPacket(channel, nbtToByteArray(nbtTagCompound));
}