Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. help

help

Scheduled Pinned Locked Moved ScriptAPI
4 Posts 4 Posters 294 Views
  • 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.
  • DreamWasFuckedD Offline
    DreamWasFuckedD Offline
    DreamWasFucked
    wrote on last edited by
    #1

    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 icewormy3I A 3 Replies Last reply
    0
    • DreamWasFuckedD DreamWasFucked

      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 Offline
      I Offline
      idk my name
      wrote on last edited by
      #2

      @skidma position does not return xyz

      1 Reply Last reply
      0
      • DreamWasFuckedD DreamWasFucked

        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')
                        }
        
        icewormy3I Offline
        icewormy3I Offline
        icewormy3
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • DreamWasFuckedD DreamWasFucked

          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')
                          }
          
          A Offline
          A Offline
          Aftery
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          About
          • Terms of Service
          • Privacy Policy
          • Status
          • Contact Us
          Downloads
          • Releases
          • Source code
          • License
          Docs
          • Tutorials
          • CustomHUD
          • AutoSettings
          • ScriptAPI
          Community
          • Forum
          • Guilded
          • YouTube
          • Twitter
          • D.Tube
          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups