当前位置: 首页>>代码示例>>Java>>正文


Java INetHandlerPlayServer类代码示例

本文整理汇总了Java中net.minecraft.network.play.INetHandlerPlayServer的典型用法代码示例。如果您正苦于以下问题:Java INetHandlerPlayServer类的具体用法?Java INetHandlerPlayServer怎么用?Java INetHandlerPlayServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


INetHandlerPlayServer类属于net.minecraft.network.play包,在下文中一共展示了INetHandlerPlayServer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clientConnectedtoServer

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
@SubscribeEvent
public void clientConnectedtoServer(FMLNetworkEvent.ServerConnectionFromClientEvent event)
{
    if (!CreeperHost.instance.active)
        return;
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (server == null || server.isSinglePlayer() || discoverMode != Discoverability.PUBLIC)
        return;

    INetHandlerPlayServer handler = event.handler;
    if (handler instanceof NetHandlerPlayServer)
    {
        EntityPlayerMP entity = ((NetHandlerPlayServer) handler).playerEntity;
        playersJoined.add(entity.getUniqueID());
    }
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:17,代码来源:CreeperHostServer.java

示例2: clientConnectedtoServer

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
@SubscribeEvent
public void clientConnectedtoServer(FMLNetworkEvent.ServerConnectionFromClientEvent event)
{
    if (!CreeperHost.instance.active)
        return;
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (server == null || server.isSinglePlayer() || discoverMode != Discoverability.PUBLIC)
        return;

    INetHandlerPlayServer handler = event.getHandler();
    if (handler instanceof NetHandlerPlayServer)
    {
        EntityPlayerMP entity = ((NetHandlerPlayServer)handler).playerEntity;
        playersJoined.add(entity.getUniqueID());
    }
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:17,代码来源:CreeperHostServer.java

示例3: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processCustomPayload(this);

    if (this.data != null)
    {
        this.data.release();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:CPacketCustomPayload.java

示例4: getWorldThread

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
@Override
public IThreadListener getWorldThread(INetHandler net)
{
    if (net instanceof INetHandlerPlayClient ||
        net instanceof INetHandlerLoginClient ||
        net instanceof INetHandlerStatusClient) return getClient();
    if (net instanceof INetHandlerHandshakeServer ||
        net instanceof INetHandlerLoginServer ||
        net instanceof INetHandlerPlayServer ||
        net instanceof INetHandlerStatusServer) return getServer();
    throw new RuntimeException("Unknown INetHandler: " + net);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:13,代码来源:FMLClientHandler.java

示例5: onDisconnect

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
@SubscribeEvent
public void onDisconnect(FMLNetworkEvent.ServerDisconnectionFromClientEvent event) {
    INetHandlerPlayServer handlerServer = event.getHandler();
    if(handlerServer instanceof NetHandlerPlayServer) {
        purgeSelection(((NetHandlerPlayServer) handlerServer).player);
    }
}
 
开发者ID:HellFirePvP,项目名称:ModularMachinery,代码行数:8,代码来源:PlayerStructureSelectionHelper.java

示例6: handlePacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
@Override
public void handlePacket(PacketCustom packet, EntityPlayerMP sender, INetHandlerPlayServer handler) {
    handlePacket((WorldServer) sender.world, sender, packet);
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:5,代码来源:WRServerPH.java

示例7: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processClientSettings(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:C15PacketClientSettings.java

示例8: ServerConnectionFromClientEvent

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
public ServerConnectionFromClientEvent(NetworkManager manager)
{
    super((INetHandlerPlayServer) manager.getNetHandler(), INetHandlerPlayServer.class, manager);
    this.isLocal = manager.isLocalChannel();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:FMLNetworkEvent.java

示例9: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processSteerBoat(this);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:CPacketSteerBoat.java

示例10: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processConfirmTransaction(this);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:CPacketConfirmTransaction.java

示例11: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processChatMessage(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:C01PacketChatMessage.java

示例12: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.handleAnimation(this);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:CPacketAnimation.java

示例13: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processCreativeInventoryAction(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:C10PacketCreativeInventoryAction.java

示例14: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.handleResourcePackStatus(this);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:CPacketResourcePackStatus.java

示例15: processPacket

import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
/**
 * Passes this Packet on to the NetHandler for processing.
 */
public void processPacket(INetHandlerPlayServer handler)
{
    handler.processUseEntity(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:C02PacketUseEntity.java


注:本文中的net.minecraft.network.play.INetHandlerPlayServer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。