mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
dye name fix
This commit is contained in:
parent
aa9743bd06
commit
2ccdbf5259
2 changed files with 23 additions and 24 deletions
|
|
@ -8,10 +8,9 @@ class BucketItem extends Item{
|
||||||
10 => "Lava Bucket"
|
10 => "Lava Bucket"
|
||||||
);
|
);
|
||||||
public function __construct($meta = 0, $count = 1){
|
public function __construct($meta = 0, $count = 1){
|
||||||
parent::__construct(BUCKET, $meta, $count, "Bucket");
|
parent::__construct(BUCKET, $meta, $count, nullsafe(self::$possiblenames[$meta], "Bucket"));
|
||||||
$this->isActivable = true;
|
$this->isActivable = true;
|
||||||
$this->maxStackSize = 1;
|
$this->maxStackSize = 1;
|
||||||
$this->name = isset(BucketItem::$possiblenames[$this->meta]) ? BucketItem::$possiblenames[$this->meta] : "Bucket";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||||
|
|
@ -47,4 +46,4 @@ class BucketItem extends Item{
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class DyeItem extends Item{
|
class DyeItem extends Item{
|
||||||
|
protected static $names = array(
|
||||||
|
0 => "Inc Sac",
|
||||||
|
1 => "Rose Red",
|
||||||
|
2 => "Cactus Green",
|
||||||
|
3 => "Cocoa Beans",
|
||||||
|
4 => "Lapis Lazuli",
|
||||||
|
5 => "Purple Dye",
|
||||||
|
6 => "Cyan Dye",
|
||||||
|
7 => "Light Gray Dye",
|
||||||
|
8 => "Gray Dye",
|
||||||
|
9 => "Pink Dye",
|
||||||
|
10 => "Lime Dye",
|
||||||
|
11 => "Dandelion Yellow",
|
||||||
|
12 => "Light Blue Dye",
|
||||||
|
13 => "Magenta Dye",
|
||||||
|
14 => "Orange Dye",
|
||||||
|
15 => "Bone Meal",
|
||||||
|
);
|
||||||
|
|
||||||
public function __construct($meta = 0, $count = 1){
|
public function __construct($meta = 0, $count = 1){
|
||||||
parent::__construct(DYE, $meta, $count, "Dye");
|
parent::__construct(DYE, $meta, $count, nullsafe(self::$names[$meta], "Dye"));
|
||||||
$names = array(
|
|
||||||
0 => "Inc Sac",
|
|
||||||
1 => "Rose Red",
|
|
||||||
2 => "Cactus Green",
|
|
||||||
3 => "Cocoa Beans",
|
|
||||||
4 => "Lapis Lazuli",
|
|
||||||
5 => "Purple Dye",
|
|
||||||
6 => "Cyan Dye",
|
|
||||||
7 => "Light Gray Dye",
|
|
||||||
8 => "Gray Dye",
|
|
||||||
9 => "Pink Dye",
|
|
||||||
10 => "Lime Dye",
|
|
||||||
11 => "Dandelion Yellow",
|
|
||||||
12 => "Light Blue Dye",
|
|
||||||
13 => "Magenta Dye",
|
|
||||||
14 => "Orange Dye",
|
|
||||||
15 => "Bone Meal",
|
|
||||||
);
|
|
||||||
$this->name = $names[$this->meta & 0x15];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue