This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knockbackSprintForce = 0.435D; | |
knockbackSprintHeight = 0.077D; | |
knockbackFriction = 2.0D; | |
knockbackForceHeight = 0.38D; | |
knockbackHeightLimit = 0.4D; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.checkMovement && !this.player.dead) { | |
// Prevent 40 event-calls for less than a single pixel of movement >.> | |
double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2); | |
float deltaAngle = Math.abs(this.lastYaw - to.getYaw()) + Math.abs(this.lastPitch - to.getPitch()); | |
// Dont execute move event on head rotation | |
if (deltaAngle > 10f) { | |
this.lastYaw = to.getYaw(); | |
this.lastPitch = to.getPitch(); | |
// TODO: PlayerHeadRotationEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraft.server; | |
// CraftBukkit start | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.craftbukkit.entity.CraftEnderPearl; | |
import org.bukkit.craftbukkit.entity.CraftEntity; | |
import org.bukkit.craftbukkit.entity.CraftPlayer; | |
import org.bukkit.craftbukkit.event.CraftEventFactory; | |
import org.bukkit.event.entity.EnderpearlLandEvent; |