Jump to content

Spyer

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

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

Spyer's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I made a packet which send the "Y" velocity to the server. public boolean handle(Supplier<Context> ctx) { ctx.get().enqueueWork(() -> { ServerPlayer player = ctx.get().getSender(); if (player != null) { //player.sendSystemMessage(Component.literal(String.valueOf(player.getDeltaMovement()))); player.getAbilities().flying = false; Vec3 vec3 = player.getDeltaMovement(); player.setDeltaMovement(vec3.x, dy, vec3.z); player.hasImpulse = true; //player.sendSystemMessage(Component.literal(String.valueOf(player.getDeltaMovement()))); } }); return true; } Where I trying to set new movement vector (setDeltaMovement) but it is not works. But the "sendSystemMessage" works perfectly here
  2. How can I change player jump height with attributes modifiers? I want to make boots that increase the strength of the jump. I want to make it like the jump boost effect works. I know that I can give jump boost effect to player every time when he jumps but there are several problems with this solution. 1) I can give jump boost effect of exact integers. This mean I can't give jump boost level between 1 and 2 (1.875 and 2.5 blocks). 2) The sign in the inventory. I can cancel event that show all these signs but that means when the boots will be on the player he will not see signs of others effects. How can I change player jump height with attributes modifiers?
  3. Thanks. But how can I work with these attribute modifiers?
  4. Hello. Where can I find how Vanilla jump boost effect works. I have been searching this class for a few hours but have not found it anywhere. I just want to use it functional in my mod.
  5. Thanks a lot. But I found an information that "Minecraft.getInstance().options.keyJump.consumeClick()" and other keybinding methods don't work on the server. But how when all my method works? I placed "if(!pLevel.isClientSide)" statement in the top of all but it somehow do the "sendSystemMessage" method.
  6. Hello. I want to make jump boost boots. But I'm not going to use jumpboost effect. I want to give player extra force. I tried to make it like this: But when I jump "player.push" method doesn't always work but "sendSystemMessage" works absolutly fine. What i did wrong?
×
×
  • Create New...

Important Information

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