Java 类net.minecraft.network.packet.Packet131MapData 实例源码

项目:PeripheralsPlusPlus    文件:NetworkHelper.java   
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());
}
项目:PeripheralsPlusPlus    文件:NetworkHelper.java   
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());
}
项目:RuneCraftery    文件:NetClientHandler.java   
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);
   }

}
项目:RuneCraftery    文件:NetServerHandler.java   
@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);
    }
项目:RuneCraftery    文件:NetClientHandler.java   
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);
    }
}
项目:BetterNutritionMod    文件:NetServerHandler.java   
@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);
    }
项目:BetterNutritionMod    文件:NetClientHandler.java   
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);
    }
}
项目:MobVsMob    文件:MapPacketHandler.java   
@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);
    }
}
项目:Chisel    文件:TinyChiselPacketHandler.java   
@Override
public void handle(NetHandler handler, Packet131MapData mapData) {
    if (handler instanceof NetServerHandler)
        ChiselEventHandler.place(handler.getPlayer(),
                handler.getPlayer().worldObj);
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
@Override
public void handleMapData(Packet131MapData par1Packet131MapData)
{
    nch.handleMapData(par1Packet131MapData);        
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
public void fmlPacket131Callback(Packet131MapData par1Packet131MapData)
{
    nch.fmlPacket131Callback(par1Packet131MapData);     
}
项目:RuneCraftery    文件:FMLClientHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    ((NetClientHandler)handler).fmlPacket131Callback(mapData);
}
项目:RuneCraftery    文件:FMLServerHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    // NOOP on server
}
项目:RuneCraftery    文件:PacketDispatcher.java   
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
{
    NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
    return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
}
项目:RuneCraftery    文件:FMLCommonHandler.java   
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    sidedDelegate.handleTinyPacket(handler, mapData);
}
项目:RuneCraftery    文件:NetHandler.java   
public void func_72494_a(Packet131MapData p_72494_1_) {
   this.func_72509_a(p_72494_1_);
}
项目:RuneCraftery    文件:ItemMap.java   
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);
}
项目:RuneCraftery    文件:FMLClientHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    ((NetClientHandler)handler).fmlPacket131Callback(mapData);
}
项目:RuneCraftery    文件:FMLServerHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    // NOOP on server
}
项目:RuneCraftery    文件:PacketDispatcher.java   
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
{
    NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
    return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
}
项目:RuneCraftery    文件:FMLCommonHandler.java   
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    sidedDelegate.handleTinyPacket(handler, mapData);
}
项目:RuneCraftery    文件:ForgeTinyPacketHandler.java   
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{

}
项目:RuneCraftery    文件:ItemMap.java   
/**
 * returns null if no update is to be sent
 */
public Packet createMapDataPacket(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
    byte[] abyte = this.getMapData(par1ItemStack, par2World).getUpdatePacketData(par1ItemStack, par2World, par3EntityPlayer);
    return abyte == null ? null : new Packet131MapData((short)Item.map.itemID, (short)par1ItemStack.getItemDamage(), abyte);
}
项目:RuneCraftery    文件:NetClientHandler.java   
/**
 * 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);
}
项目:RuneCraftery    文件:ForgeTinyPacketHandler.java   
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{

}
项目:BetterNutritionMod    文件:FMLClientHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    ((NetClientHandler)handler).fmlPacket131Callback(mapData);
}
项目:BetterNutritionMod    文件:FMLServerHandler.java   
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    // NOOP on server
}
项目:BetterNutritionMod    文件:PacketDispatcher.java   
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
{
    NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
    return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
}
项目:BetterNutritionMod    文件:FMLCommonHandler.java   
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
    sidedDelegate.handleTinyPacket(handler, mapData);
}
项目:BetterNutritionMod    文件:ForgeTinyPacketHandler.java   
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{

}
项目:BetterNutritionMod    文件:ItemMap.java   
/**
 * returns null if no update is to be sent
 */
public Packet createMapDataPacket(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
    byte[] abyte = this.getMapData(par1ItemStack, par2World).getUpdatePacketData(par1ItemStack, par2World, par3EntityPlayer);
    return abyte == null ? null : new Packet131MapData((short)Item.map.itemID, (short)par1ItemStack.getItemDamage(), abyte);
}
项目:BetterNutritionMod    文件:NetClientHandler.java   
/**
 * 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);
}
项目:MLIA    文件:NetClientHandler.java   
public void fmlPacket131Callback(Packet131MapData mapData) {

    }
项目:RuneCraftery    文件:IFMLSidedHandler.java   
void handleTinyPacket(NetHandler handler, Packet131MapData mapData);
项目:RuneCraftery    文件:IFMLSidedHandler.java   
void handleTinyPacket(NetHandler handler, Packet131MapData mapData);
项目:BetterNutritionMod    文件:IFMLSidedHandler.java   
void handleTinyPacket(NetHandler handler, Packet131MapData mapData);