Jump to content

Niinnnnnn

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Niinnnnnn's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. You're one of the funniest people I've ever seen. but if you do not understand the question does not answer, it's ugly for you
  2. I have a project of a mod in my eclipse, how do I have another in the same workspace
  3. Do I need to use ItemSword to create a sword or create an ItemArmor armor and use ToolMaterial and ArmorMaterial? This was made for ease, right? it is not mandatory to use
  4. ohh ok, but how do I do it now to boost the player, would it be with setVelocity? oho
  5. how do I do now that I've used getLookVec ()? I do not know how I get the direction he's looking with getLookVec (). I need this to send a boost to where he's looking for this I'm going to use setVelocity
  6. Entity Player does not have getLookHelper() or at least I could not find
  7. This will fire when the jump event fires which is probably not what you want. You probably want to check that Entity.onGround is true in some kind of tick event. Also your double jump will only work if jumps[playername] == 1 yet you set it to 0 here thus making sure it won't work ever again. And you know why it won't work? Because when the tick event fires next and checks for the block below the player it is not going to be an air block. Thus it will set the jumps to 0 again even though you've jumped. this
  8. I do not know why it turned up this.
  9. it was written "How can i do this"
  10. I managed to pack everything but the last thing you said no How can I do this
  11. I did a double jump code but it only works sometimes Can someone tell me what I did wrong? It works but not all the time. private static HashMap<String, Integer> jumps = new HashMap<String, Integer>(); private static int keyvalue; public static void jump(EntityPlayer p) { int x = p.getPosition().getX(); int y = p.getPosition().getY(); int z = p.getPosition().getZ(); World world = p.getEntityWorld(); BlockPos pos = new BlockPos(x, y - 1, z); if (world.getBlockState(pos).getBlock() instanceof BlockAir) { if (jumps.get(p.getName()) == 1 && p.motionY < 0.07 ) { p.setVelocity(0.0F, 1.0F, 0.0F); System.out.println("aaaa: " + jumps.get(p.getName())); jumps.put(p.getName(), jumps.get(p.getName()) + 1); System.out.println("bbbb: " + jumps.get(p.getName())); } else if(jumps.get(p.getName()) >= 2) { } } if (!(world.getBlockState(pos).getBlock() instanceof BlockAir)) { jumps.put(p.getName(), 0); // System.out.println("cccc: " + jumps.get(p.getName())); } } @SubscribeEvent public static void getKeyJump(LivingJumpEvent e) { if (e.getEntity() instanceof EntityPlayer) { EntityPlayer p = (EntityPlayer) e.getEntity(); int key = Keyboard.getEventKey(); keyvalue = key; jumps.put(p.getName(), 1); } } @SideOnly(Side.CLIENT) @SubscribeEvent public static void a(PlayerTickEvent e) { EntityPlayer p = (EntityPlayer) e.player; if (Keyboard.isKeyDown(keyvalue)) { jump(p); } }
  12. how do I get the player that used the key in the ClientTickEvent event forge 1.12
  13. Okay, I would stay there KeyBinding [] keyBinding = Here I would put what? Sorry, I'm kind of slow, please do not lose patience with me.
×
×
  • Create New...

Important Information

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