Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** * Updates an entity's position and rotation as specified by the packet */ public void handleEntityTeleport(S18PacketEntityTeleport packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId()); if (entity != null) { entity.serverPosX = packetIn.getX(); entity.serverPosY = packetIn.getY(); entity.serverPosZ = packetIn.getZ(); double d0 = (double)entity.serverPosX / 32.0D; double d1 = (double)entity.serverPosY / 32.0D; double d2 = (double)entity.serverPosZ / 32.0D; float f = (float)(packetIn.getYaw() * 360) / 256.0F; float f1 = (float)(packetIn.getPitch() * 360) / 256.0F; if (Math.abs(entity.posX - d0) < 0.03125D && Math.abs(entity.posY - d1) < 0.015625D && Math.abs(entity.posZ - d2) < 0.03125D) { entity.setPositionAndRotation2(entity.posX, entity.posY, entity.posZ, f, f1, 3, true); } else { entity.setPositionAndRotation2(d0, d1, d2, f, f1, 3, true); } if(entity == Minecraft.getMinecraft().thePlayer) { PlayerHandler.yaw = f; PlayerHandler.pitch = f1; } entity.onGround = packetIn.getOnGround(); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)