mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
fixed minecart
This commit is contained in:
parent
5f1774b8ce
commit
f200683643
3 changed files with 2 additions and 3 deletions
|
|
@ -621,7 +621,7 @@ class PocketMinecraftServer{
|
||||||
++$actionCount;
|
++$actionCount;
|
||||||
try{
|
try{
|
||||||
$return = @call_user_func($this->schedule[$cid][0] ?? function(){}, $this->schedule[$cid][1], $this->schedule[$cid][2]); //somehow args can be null
|
$return = @call_user_func($this->schedule[$cid][0] ?? function(){}, $this->schedule[$cid][1], $this->schedule[$cid][2]); //somehow args can be null
|
||||||
}catch(Throwable $e){
|
}catch(TypeError $e){
|
||||||
$return = false;
|
$return = false;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ class Minecart extends Vehicle{
|
||||||
$this->width = 0.98;
|
$this->width = 0.98;
|
||||||
$this->height = 0.7;
|
$this->height = 0.7;
|
||||||
$this->yOffset = $this->height / 2;
|
$this->yOffset = $this->height / 2;
|
||||||
$this->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDrops(){
|
public function getDrops(){
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ class MinecartItem extends Item{
|
||||||
"x" => $target->getX() + 0.5,
|
"x" => $target->getX() + 0.5,
|
||||||
"y" => $target->getY() + 0.8,
|
"y" => $target->getY() + 0.8,
|
||||||
"z" => $target->getZ() + 0.5,
|
"z" => $target->getZ() + 0.5,
|
||||||
];
|
];
|
||||||
$e = $server->api->entity->add($level, ENTITY_OBJECT, OBJECT_MINECART, $data);
|
$e = $server->api->entity->add($level, ENTITY_OBJECT, OBJECT_MINECART, $data);
|
||||||
$server->api->entity->spawnToAll($e);
|
$server->api->entity->spawnToAll($e);
|
||||||
if(($player->gamemode & 0x01) === 0x00){
|
if(($player->gamemode & 0x01) === 0x00){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue