本文整理汇总了Java中net.minecraft.network.packet.Packet131MapData类的典型用法代码示例。如果您正苦于以下问题:Java Packet131MapData类的具体用法?Java Packet131MapData怎么用?Java Packet131MapData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Packet131MapData类属于net.minecraft.network.packet包,在下文中一共展示了Packet131MapData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTileInfoPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getTileInfoPacket(TileEntity tile) {
if (!(tile instanceof IEntityAdditionalSpawnData)) throw new IllegalArgumentException("Tile information packets require a TileEntity implementing IEntityAdditionalSpawnData");
IEntityAdditionalSpawnData data = (IEntityAdditionalSpawnData)tile;
ByteArrayDataOutput os = ByteStreams.newDataOutput();
os.writeInt(tile.xCoord);
os.writeInt(tile.yCoord);
os.writeInt(tile.zCoord);
data.writeSpawnData(os);
return PacketDispatcher.getTinyPacket(MiscPeripherals.instance, (short)3, os.toByteArray());
}
示例2: getModulePacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getModulePacket(Module module, byte[] data) {
ByteArrayDataOutput os = ByteStreams.newDataOutput();
os.writeUTF(module.getClass().getSimpleName().substring(6));
os.write(data);
return PacketDispatcher.getTinyPacket(MiscPeripherals.instance, (short)6, os.toByteArray());
}
示例3: func_72494_a
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void func_72494_a(Packet131MapData p_72494_1_) {
if(p_72494_1_.field_73438_a == Item.field_77744_bd.field_77779_bT) {
ItemMap.func_77874_a(p_72494_1_.field_73436_b, this.field_72563_h.field_71441_e).func_76192_a(p_72494_1_.field_73437_c);
} else {
this.field_72563_h.func_98033_al().func_98236_b("Unknown itemid: " + p_72494_1_.field_73436_b);
}
}
示例4: handleMapData
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
/**
* Contains logic for handling packets containing arbitrary unique item data. Currently this is only for maps.
*/
public void handleMapData(Packet131MapData par1Packet131MapData)
{
FMLNetworkHandler.handlePacket131Packet(this, par1Packet131MapData);
}
示例5: fmlPacket131Callback
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void fmlPacket131Callback(Packet131MapData par1Packet131MapData)
{
if (par1Packet131MapData.itemID == Item.map.itemID)
{
ItemMap.getMPMapData(par1Packet131MapData.uniqueID, this.mc.theWorld).updateMPMapData(par1Packet131MapData.itemData);
}
else
{
this.mc.getLogAgent().logWarning("Unknown itemid: " + par1Packet131MapData.uniqueID);
}
}
示例6: handle
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{
int id = mapData.uniqueID;
if(handler instanceof NetServerHandler)
{
handleServerPacket((NetServerHandler)handler, mapData.uniqueID, mapData.itemData, (EntityPlayerMP)handler.getPlayer());
}
else
{
handleClientPacket((NetClientHandler)handler, mapData.uniqueID, mapData.itemData);
}
}
示例7: handle
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handle(NetHandler handler, Packet131MapData mapData) {
if (handler instanceof NetServerHandler)
ChiselEventHandler.place(handler.getPlayer(),
handler.getPlayer().worldObj);
}
示例8: handleMapData
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleMapData(Packet131MapData par1Packet131MapData)
{
nch.handleMapData(par1Packet131MapData);
}
示例9: fmlPacket131Callback
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void fmlPacket131Callback(Packet131MapData par1Packet131MapData)
{
nch.fmlPacket131Callback(par1Packet131MapData);
}
示例10: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
((NetClientHandler)handler).fmlPacket131Callback(mapData);
}
示例11: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
// NOOP on server
}
示例12: getTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
{
NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
}
示例13: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
sidedDelegate.handleTinyPacket(handler, mapData);
}
示例14: func_72494_a
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void func_72494_a(Packet131MapData p_72494_1_) {
this.func_72509_a(p_72494_1_);
}
示例15: func_77871_c
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public Packet func_77871_c(ItemStack p_77871_1_, World p_77871_2_, EntityPlayer p_77871_3_) {
byte[] var4 = this.func_77873_a(p_77871_1_, p_77871_2_).func_76193_a(p_77871_1_, p_77871_2_, p_77871_3_);
return var4 == null?null:new Packet131MapData((short)Item.field_77744_bd.field_77779_bT, (short)p_77871_1_.func_77960_j(), var4);
}