Jump to content

Recommended Posts

Posted

So I've been writing a mod almost non-stop for the past few days, and for some reason the server doesn't seem to be going through the events I have, but the client does. Isn't it supposed to be interlaced, now? What's the deal?

 

(In my main class)

     @ServerStarting
     public void serverStart(FMLServerStartingEvent event)
     {
    	server = event.getServer();
    	processor = DataHandler.getProcessor();
MinecraftForge.EVENT_BUS.register(new EventHookContainerClass());
        ServerCommandManager scm = (ServerCommandManager)event.getServer().getCommandManager();
        scm.registerCommand(new CommandCreateShape());
        scm.registerCommand(new CommandCreatePolyzone());
     }

 

(In my event handler)

        @ForgeSubscribe
        public void onEntityMove(LivingUpdateEvent event)
        {        	        
if(event.entity instanceof EntityPlayer || event.entity instanceof EntityPlayerMP)
    	{
    			EntityPlayer player = (EntityPlayer) event.entity;
        	if(((int)(player.posY - player.getEyeHeight()) == (int)player.posY))
        	{
	        	if(PolyZones.processor.getPlayer(((EntityPlayer)event.entity).username) == null)
	        	{
	        		if(Side.CLIENT.isClient())
	        		{
	        			System.out.println("I'm a client!");
	        		}
	        		if(Side.SERVER.isServer())
	        		{
	        			System.out.println("I'm a server!");
	        		}
		        	PolyZones.processor.addPlayer((EntityPlayer)event.entity);
        			player.sendChatToPlayer("Added new CustomPlayer " + PolyZones.processor.getPlayer(player.username).getName());
	        	}
                   }
}
}

 

 

Any help is appreciated. Thank you!

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.