Navigation

    CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    help

    ScriptAPI
    4
    4
    71
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • skidma
      skidma last edited by

      Why doesnt the first code work and the second works?

      var Block = Java.type('net.minecraft.block.Block');
      var BlockPos = Java.type('net.minecraft.util.BlockPos');
      
              if (mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.getPosition())).getBlock() == Block.getBlockById(65)) {
                  Chat.print('a')
              }
      
      var Block = Java.type('net.minecraft.block.Block');
      var BlockPos = Java.type('net.minecraft.util.BlockPos');
      
                      if (mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)).getBlock() == Block.getBlockById(65)) {
                          Chat.print('a')
                      }
      
      I icewormy3 A 3 Replies Last reply Reply Quote 0
      • I
        idk my name @skidma last edited by

        @skidma position does not return xyz

        1 Reply Last reply Reply Quote 0
        • icewormy3
          icewormy3 @skidma last edited by

          @skidma mc.thePlayer.getPosition() already returns as a BlockPos so theres no need to make a new instance

          1 Reply Last reply Reply Quote 0
          • A
            Aftery @skidma last edited by

            @skidma id tell you to rtfm but looks like you dno how to rtfm

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors