mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Big update about mobs
Removes some array() and some another minor changes.
Cow now drop 0-3 meat.
Pigs can be saddled, and if pig saddled it will drop them.
Creeper can be blown up with flint and steel ("power" => 3).
You can ride on pig (some buggy).
Now Saddle maxStackSize = 1.
Using shears and flint&steel on sheep and creeper they will break.
Saddled will save with closing the server.
This commit is contained in:
parent
2a52e6c69c
commit
f5222be9d2
17 changed files with 221 additions and 180 deletions
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
class Minecart extends Vehicle{
|
||||
const TYPE = OBJECT_MINECART;
|
||||
|
||||
private $moveVector = [];
|
||||
const STATE_INITIAL = 0;
|
||||
const STATE_ON_RAIL = 1;
|
||||
const STATE_OFF_RAIL = 2;
|
||||
|
||||
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->x = isset($this->data["TileX"]) ? $this->data["TileX"]:$this->x;
|
||||
$this->y = isset($this->data["TileY"]) ? $this->data["TileY"]:$this->y;
|
||||
|
|
@ -25,9 +23,9 @@ class Minecart extends Vehicle{
|
|||
}
|
||||
|
||||
public function getDrops(){
|
||||
return array(
|
||||
array(MINECART, 0, 1),
|
||||
);
|
||||
return [
|
||||
[MINECART, 0, 1]
|
||||
];
|
||||
}
|
||||
|
||||
public function spawn($player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue