Posted July 8, 201411 yr I have a food that when you eat it, it adds 16000 ticks to the worlds time. But everytime i eat it, the time changes for a second and then goes back to the way it was before. Here is my code protected void onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer entity) { mc.theWorld.setWorldTime(mc.theWorld.getWorldTime() + 16000); }
July 8, 201411 yr protected void onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer entity) { if(!par2World.isRemote) //do nothing at client par2World.setWorldTime(par2World.getWorldTime() + 16000); }
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.