Jump to content

satyamedh

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

601 profile views

satyamedh's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. destroyBlock dosent exists
  2. bruh Thats the only command intellij tells me
  3. It is basically what the client does
  4. I checked it a long time ago. heres the new code I updated but didnt post: public static boolean attack(){ ClientPlayerEntity player = Minecraft.getInstance().player; if ((player == null)) {return false;} RayTraceResult lookingAt = Minecraft.getInstance().objectMouseOver; assert lookingAt != null; System.out.println(lookingAt.getType().toString()); if (lookingAt.getType() == RayTraceResult.Type.BLOCK) { if (lookingAt.getType().toString() == "a"){ System.out.println("Yeaaa"); } double x = lookingAt.getHitVec().getX(); double y = lookingAt.getHitVec().getY(); double z = lookingAt.getHitVec().getZ(); net.minecraftforge.client.event.InputEvent.ClickInputEvent inputEvent = net.minecraftforge.client.ForgeHooksClient.onClickInput(0, Minecraft.getInstance().gameSettings.keyBindAttack, Hand.MAIN_HAND); if (inputEvent.shouldSwingHand()) { Minecraft.getInstance().particles.addBlockHitEffects(new BlockPos(x, y, z), (BlockRayTraceResult) lookingAt); Minecraft.getInstance().player.swingArm(Hand.MAIN_HAND); } player.world.getBlockState(new BlockPos(x, y, z)) .getBlock(). harvestBlock( player.world, player, new BlockPos(x, y, z), player.world.getBlockState(new BlockPos(x, y, z)), player.world.getTileEntity(new BlockPos(x, y, z)), player.getHeldItemMainhand() ); } return true; }
  5. Do u know the function that is called?
  6. okay. so how do I continue?
  7. It is basically a helper mod for my project. All I need this mod to do is to do what a normal player can whenever I ask it to do something from python. the python-java communication is flawless. just need a way to contol the player. so I guess it is up to you who says what I need
  8. Hello! I have this code now: public static boolean attack(){ ClientPlayerEntity player = Minecraft.getInstance().player; if ((player == null)) {return false;} RayTraceResult lookingAt = Minecraft.getInstance().objectMouseOver; assert lookingAt != null; System.out.println(lookingAt.getType().toString()); if (lookingAt.getType() == RayTraceResult.Type.BLOCK) { if (lookingAt.getType().toString() == "a"){ System.out.println("Yeaaa"); } double x = lookingAt.getHitVec().getX(); double y = lookingAt.getHitVec().getY(); double z = lookingAt.getHitVec().getZ(); Minecraft.getInstance().particles.addBlockHitEffects(new BlockPos(x, y, z), (BlockRayTraceResult) lookingAt); Minecraft.getInstance().player.swingArm(Hand.MAIN_HAND); player.world.getBlockState(new BlockPos(x, y, z)) .getBlock(). harvestBlock( player.world, player, new BlockPos(x, y, z), player.world.getBlockState(new BlockPos(x, y, z)), player.world.getTileEntity(new BlockPos(x, y, z)), player.getHeldItemMainhand() ); } return true; } And It just animates the block breaking, but dosent drop the block. pls help
  9. Exactly what class isit? How do i go there in intellij?
  10. Where do I start
  11. I mean the funcions And what a quick reply :rofl:
  12. And LOL I answered so quick there :')
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.