help
-
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') }
-
@skidma position does not return xyz
-
@skidma mc.thePlayer.getPosition() already returns as a BlockPos so theres no need to make a new instance
-
@skidma id tell you to rtfm but looks like you dno how to rtfm