Jump to content


packets and net.minecraft


  • Please log in to reply
3 replies to this topic

#1 aspens

aspens

    Servant of Chuck Knoblock the one armed one man army


  • 4 posts
  • Joined January 11, 2017
-3
  • Male

Posted 10 January 2017 - 08:57 PM

hi
i am a noob
is it possible to modify the speed of your player entity using c03packetplayer or something
i kind of know how to use packets i used them before to do critical hack and stuff but i dont know if it is possible to use them to modify your entities speed
i know u can modify your entities speed like this
Wrapper.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1); /* default is 0.1 i think idk */
but i want to do it someway like this
Wrapper.mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(Wrapper.mc.thePlayer.posX + 696969696696969696, Wrapper.mc.thePlayer.posY, Wrapper.mc.thePlayer.posZ, false));
but with making them go faster not teleporting them lol
o m g i can use this code for vclip
idk lool help me

good nite

Edited by aspens, 10 January 2017 - 08:57 PM.


#2 DeCoolJB

DeCoolJB

    Servant of Chuck Knoblock the one armed long arm of the Law


  • 1005 posts
  • Joined October 8, 2011
363
  • Male
  • LocationMiskolc

Posted 11 January 2017 - 12:46 AM

No, you can't (with packets, at least.)

Your character's velocity and speed are 0 on the serverside. In fact, the server doesn't even know your character has velocity or speed, but rather it only cares about the player entity's position. That's why some shitty freecams tend to "freeze" your character server-side, which allows staff to detect your hacks via water buckets (the water doesn't push your player because the server doesn't try to apply a velocity to your character to move it.)

As you can probably guess, the server's understanding of your speed/velocity comes from the position packets your client sends, the delta changes between each consecutive position and their related delta times. In other words, your position on the server is entirely* dictated by your player's position on your client, which is why fly hacks are still possible to use on vanilla servers and unprotected Spigot servers.

If you want to "increase" your speed server-side, you make your character run faster client-side. It's as simple as that.

As to the method to actually achieve that, just look at how speed potions increase your running speed. I don't even have Minecraft's decompiled source at the moment, so I wouldn't know what class you need to begin with.

*There are measures to counteract cheats, obviously. For example, travelling millions of blocks instantly tends to freak the game out and consequently kick you. Or if you travel a certain amount in the air without descending (which ultimately increases the fall damage you get when you land), the game will kick you for flying. Again, it depends on the calculated velocity the server creates using your client's position packets and delta times.

Edited by DeCoolJB, 11 January 2017 - 12:51 AM.

Jesus loves you.

#3 aspens

aspens

    Servant of Chuck Knoblock the one armed one man army


  • 4 posts
  • Joined January 11, 2017
-3
  • Male

Posted 11 January 2017 - 03:18 PM

View PostDeCoolJB, on 11 January 2017 - 12:46 AM, said:

No, you can't (with packets, at least.)

Your character's velocity and speed are 0 on the serverside. In fact, the server doesn't even know your character has velocity or speed, but rather it only cares about the player entity's position. That's why some shitty freecams tend to "freeze" your character server-side, which allows staff to detect your hacks via water buckets (the water doesn't push your player because the server doesn't try to apply a velocity to your character to move it.)

As you can probably guess, the server's understanding of your speed/velocity comes from the position packets your client sends, the delta changes between each consecutive position and their related delta times. In other words, your position on the server is entirely* dictated by your player's position on your client, which is why fly hacks are still possible to use on vanilla servers and unprotected Spigot servers.

If you want to "increase" your speed server-side, you make your character run faster client-side. It's as simple as that.

As to the method to actually achieve that, just look at how speed potions increase your running speed. I don't even have Minecraft's decompiled source at the moment, so I wouldn't know what class you need to begin with.

*There are measures to counteract cheats, obviously. For example, travelling millions of blocks instantly tends to freak the game out and consequently kick you. Or if you travel a certain amount in the air without descending (which ultimately increases the fall damage you get when you land), the game will kick you for flying. Again, it depends on the calculated velocity the server creates using your client's position packets and delta times.

View PostDeCoolJB, on 11 January 2017 - 12:46 AM, said:

No, you can't (with packets, at least.)

Your character's velocity and speed are 0 on the serverside. In fact, the server doesn't even know your character has velocity or speed, but rather it only cares about the player entity's position. That's why some shitty freecams tend to "freeze" your character server-side, which allows staff to detect your hacks via water buckets (the water doesn't push your player because the server doesn't try to apply a velocity to your character to move it.)

As you can probably guess, the server's understanding of your speed/velocity comes from the position packets your client sends, the delta changes between each consecutive position and their related delta times. In other words, your position on the server is entirely* dictated by your player's position on your client, which is why fly hacks are still possible to use on vanilla servers and unprotected Spigot servers.

If you want to "increase" your speed server-side, you make your character run faster client-side. It's as simple as that.

As to the method to actually achieve that, just look at how speed potions increase your running speed. I don't even have Minecraft's decompiled source at the moment, so I wouldn't know what class you need to begin with.

*There are measures to counteract cheats, obviously. For example, travelling millions of blocks instantly tends to freak the game out and consequently kick you. Or if you travel a certain amount in the air without descending (which ultimately increases the fall damage you get when you land), the game will kick you for flying. Again, it depends on the calculated velocity the server creates using your client's position packets and delta times.
ok thanx

#4 dejordzta

dejordzta

    Scrooge


  • 1937 posts
  • Joined August 2, 2011
1671
  • Male
  • LocationKiwiland :D

Posted 15 January 2017 - 04:43 AM

Also, please use the Minecraft subsection for any/all Minecraft related programming queries :)
Legion: Pleasing her is like having to do standup comedy at the Nuremberg trials.
Sirenfal: Dejordzta you magnificent bastard

Posted Image



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Welcome to our forum! We would like to encourage you to contribute to our community by posting and talking in the shoutbox.

Please consider joining us by logging in or registering.