• 0.947391304347826

    posted a message on [1.7.10] Check if player steps on block

    I wanted to make a block that adds a potion effect on the player when they step on it. 

    I got this code so far, but it isn't working, idk why.


    public void getBlockPlayerIsStanding(EntityPlayer player)
    		World world = player.worldObj;
    		Block block = world.getBlock((int)player.posX, (int)player.posY - 1, (int)player.posZ);
    		if(block == Specialization.blockSpeedPod)
    			player.addPotionEffect(new PotionEffect(1, 5, 1));


    Posted in: Mod Development
  • To post a comment, please or register a new account.