mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
WIP: HurtArmor for MCPE 0.6.1
This commit is contained in:
parent
d963e049a8
commit
bec37f62f8
2 changed files with 5 additions and 1 deletions
|
|
@ -1634,6 +1634,11 @@ class Entity extends Position
|
|||
$part->hurtAndBreak($v2, $this->player, helditem: false);
|
||||
if($part->count <= 0) $this->player->setArmor($slot, BlockAPI::getItem(0, 0, 0), send: false);
|
||||
}
|
||||
if($this->player->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_11 && $this->player->PROTOCOL > ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
$pk = new HurtArmorPacket();
|
||||
$pk->health = $part->meta - $v2;
|
||||
//$this->player->dataPacket($pk); //MCPE 0.6.0
|
||||
}
|
||||
$this->player->sendArmor();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -938,7 +938,6 @@ class CraftingRecipes{
|
|||
return true; //recipe might be found next time
|
||||
}
|
||||
if($protocol <= ProtocolInfo12::CURRENT_PROTOCOL_12 && $protocol >= ProtocolInfo12::CURRENT_PROTOCOL_11 && ($craftIndex === "5:0x4" || $craftIndex === "53:0x4" || $craftIndex === "158:0x6")){
|
||||
console(2);
|
||||
switch ($craftIndex){
|
||||
case "5:0x4":
|
||||
$arr[$craftIndex][][] = [WOOD, "?", 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue