本文整理汇总了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());
}
}
示例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());
}
}
示例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();
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例8: ServerConnectionFromClientEvent
import net.minecraft.network.play.INetHandlerPlayServer; //导入依赖的package包/类
public ServerConnectionFromClientEvent(NetworkManager manager)
{
super((INetHandlerPlayServer) manager.getNetHandler(), INetHandlerPlayServer.class, manager);
this.isLocal = manager.isLocalChannel();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}