Posted August 21, 201312 yr So Im trying to code something to happen when the player is on land. I do if(player.onGround()){ but it eclipse says it is an error even though it was in the list. Can anyone help?
August 21, 201312 yr Can you show me the whole code where you are using this if statement? I am the creator of the Soul Forest Mod : http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
August 21, 201312 yr Author Can you show me the whole code where you are using this if statement? Here you go: @Override public boolean func_111207_a(ItemStack itemstack, EntityPlayer player, EntityLivingBase target){ if(!target.worldObj.isRemote){ if(target instanceof EntityCreeper){ if(player.onGround()){ target.motionY = 2.5; } else { player.addChatMessage("This item only works while on the ground!"); }
August 21, 201312 yr And what does that func_* do? shouldn't u use onItemRightClick? I am the creator of the Soul Forest Mod : http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
August 21, 201312 yr So what do you want your item to do? I am the creator of the Soul Forest Mod : http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
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.