mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed items getting damaged when hitting players in gm 1
This commit is contained in:
parent
e30586fff2
commit
b63741dc22
3 changed files with 6 additions and 5 deletions
|
|
@ -1230,6 +1230,7 @@ class Player{
|
|||
$motionSent = false;
|
||||
$moveSent = false;
|
||||
$headSent = false;
|
||||
|
||||
if($e->speedX != 0 || $e->speedY != 0 || $e->speedZ != 0 || $e->speedY != $e->lastSpeedY || $e->speedX != $e->lastSpeedX || $e->speedZ != $e->lastSpeedZ){
|
||||
if(!($e->speedY < 0 && $e->onGround) || $e->speedX != 0 || $e->speedZ != 0 || $e->speedY != $e->lastSpeedY || $e->speedX != $e->lastSpeedX || $e->speedZ != $e->lastSpeedZ){
|
||||
$motion = new SetEntityMotionPacket();
|
||||
|
|
@ -2653,7 +2654,7 @@ class Player{
|
|||
}
|
||||
|
||||
public function damageArmorPart($slot, $part){
|
||||
$part->useOn($this->entity, true); //PocketMine is forced to do it =<. Even if PocketMine doesnt want, he have to damage your armor.
|
||||
$part->useOn($this->entity, true);
|
||||
if($part->getMetadata() >= $part->getMaxDurability()){
|
||||
$this->setArmor($slot, BlockAPI::getItem(AIR, 0, 0), false);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue