mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Added Single Explosions [ignite TNT using fling & steel]
This commit is contained in:
parent
41b1a0f991
commit
94f8cfb59b
77 changed files with 134 additions and 32 deletions
|
|
@ -27,6 +27,7 @@ class StairBlock extends TransparentBlock{
|
|||
}else{
|
||||
$this->isFullBlock = false;
|
||||
}
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class LadderBlock extends TransparentBlock{
|
|||
parent::__construct(LADDER, $meta, "Ladder");
|
||||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 2;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->isTransparent === false){
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class SignPostBlock extends TransparentBlock{
|
|||
parent::__construct(SIGN_POST, $meta, "Sign Post");
|
||||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 5;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class TorchBlock extends FlowableBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(TORCH, $meta, "Torch");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class TrapdoorBlock extends TransparentBlock{
|
|||
}else{
|
||||
$this->isFullBlock = true;
|
||||
}
|
||||
$this->hardness = 15;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if(($target->isTransparent === false or $target->getID() === SLAB) and $face !== 0 and $face !== 1){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class LavaBlock extends LiquidBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(LAVA, $meta, "Lava");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class StillLavaBlock extends LiquidBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(STILL_LAVA, $meta, "Still Lava");
|
||||
$this->hardness = 500;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ require_once("Water.php");
|
|||
class StillWaterBlock extends WaterBlock{
|
||||
public function __construct($meta = 0){
|
||||
LiquidBlock::__construct(STILL_WATER, $meta, "Still Water");
|
||||
$this->hardness = 500;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class WaterBlock extends LiquidBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(WATER, $meta, "Water");
|
||||
$this->hardness = 500;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class AirBlock extends TransparentBlock{
|
|||
$this->hasPhysics = false;
|
||||
$this->isSolid = false;
|
||||
$this->isFullBlock = true;
|
||||
$this->hardness = 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class BedBlock extends TransparentBlock{
|
|||
parent::__construct(BED_BLOCK, $type, "Bed Block");
|
||||
$this->isActivable = true;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 1;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class FireBlock extends FlowableBlock{
|
|||
$this->isReplaceable = true;
|
||||
$this->breakable = false;
|
||||
$this->isFullBlock = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,5 +22,19 @@
|
|||
class TNTBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(TNT, 0, "TNT");
|
||||
$this->hardness = 0;
|
||||
$this->isActivable = true;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
if($item->getID() === FLINT_STEEL){
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$item->useOn($this);
|
||||
}
|
||||
$explosion = new Explosion($this->level, $this, 4);
|
||||
$explosion->explode();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,7 @@ class CakeBlock extends TransparentBlock{
|
|||
$this->isFullBlock = false;
|
||||
$this->isActivable = true;
|
||||
$this->meta = $meta & 0x07;
|
||||
$this->hardness = 2.5;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class CobwebBlock extends FlowableBlock{
|
|||
parent::__construct(COBWEB, 0, "Cobweb");
|
||||
$this->isSolid = true;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 25;
|
||||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array();
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class FenceBlock extends TransparentBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(FENCE, 0, "Fence");
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,6 +28,7 @@ class FenceGateBlock extends TransparentBlock{
|
|||
}else{
|
||||
$this->isFullBlock = false;
|
||||
}
|
||||
$this->hardness = 15;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$faces = array(
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class IronDoorBlock extends DoorBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(IRON_DOOR_BLOCK, $meta, "Iron Door Block");
|
||||
//$this->isActivable = true;
|
||||
$this->hardness = 25;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ class SlabBlock extends TransparentBlock{
|
|||
3 => "Cobblestone",
|
||||
4 => "Brick",
|
||||
5 => "Stone Brick",
|
||||
//6 => "Nether Brick",
|
||||
6 => "Quartz",
|
||||
);
|
||||
$this->name = (($this->meta & 0x08) === 0x08 ? "Upper ":"") . $names[$this->meta & 0x07] . " Slab";
|
||||
|
|
@ -37,7 +36,8 @@ class SlabBlock extends TransparentBlock{
|
|||
$this->isFullBlock = true;
|
||||
}else{
|
||||
$this->isFullBlock = false;
|
||||
}
|
||||
}
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class SnowLayerBlock extends FlowableBlock{
|
|||
$this->isReplaceable = true;
|
||||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 0.5;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class WoodDoorBlock extends DoorBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(WOOD_DOOR_BLOCK, $meta, "Wood Door Block");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class CoalOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(COAL_ORE, 0, "Coal Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class DiamondOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(DIAMOND_ORE, 0, "Diamond Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GlowingRedstoneOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GLOWING_REDSTONE_ORE, 0, "Glowing Redstone Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GoldOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GOLD_ORE, 0, "Gold Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class IronOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(IRON_ORE, 0, "Iron Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class LapisOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(LAPIS_ORE, 0, "Lapis Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class RedstoneOreBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(REDSTONE_ORE, 0, "Redstone Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class BrownMushroomBlock extends FlowableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(BROWN_MUSHROOM, 0, "Brown Mushroom");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class CactusBlock extends TransparentBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(CACTUS, $meta, "Cactus");
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 2;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class CyanFlowerBlock extends FlowableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(CYAN_FLOWER, 0, "Cyan Flower");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class DandelionBlock extends FlowableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(DANDELION, 0, "Dandelion");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class DeadBushBlock extends FlowableBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(DEAD_BUSH, 0, "Dead Bush");
|
||||
$this->isReplaceable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class MelonStemBlock extends FlowableBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(MELON_STEM, $meta, "Melon Stem");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$down = $this->getSide(0);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class RedMushroomBlock extends FlowableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(RED_MUSHROOM, 0, "Red Mushroom");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class SaplingBlock extends FlowableBlock{
|
|||
2 => "Birch Sapling",
|
||||
);
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class SugarcaneBlock extends FlowableBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(SUGARCANE_BLOCK, $meta, "Sugarcane");
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class TallGrassBlock extends FlowableBlock{
|
|||
2 => "Fern",
|
||||
);
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class WheatBlock extends FlowableBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(WHEAT_BLOCK, $meta, "Wheat Block");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class BedrockBlock extends SolidBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(BEDROCK, 0, "Bedrock");
|
||||
$this->breakable = false;
|
||||
$this->hardness = 18000000;
|
||||
}
|
||||
|
||||
public function isBreakable(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class BookshelfBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(BOOKSHELF, 0, "Bookshelf");
|
||||
$this->hardness = 7.5;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class BricksBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(BRICKS_BLOCK, 0, "Bricks");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class BurningFurnaceBlock extends SolidBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(BURNING_FURNACE, $meta, "Burning Furnace");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 17.5;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class ChestBlock extends TransparentBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(CHEST, $meta, "Chest");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 15;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$server = ServerAPI::request();
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class ClayBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(CLAY_BLOCK, 0, "Clay Block");
|
||||
$this->hardness = 3;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class CobblestoneBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(COBBLESTONE, 0, "Cobblestone");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class DiamondBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(DIAMOND_BLOCK, 0, "Diamond Block");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class DirtBlock extends SolidBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(DIRT, 0, "Dirt");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 2.5;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ class DoubleSlabBlock extends SolidBlock{
|
|||
3 => "Cobblestone",
|
||||
4 => "Brick",
|
||||
5 => "Stone Brick",
|
||||
6 => "Nether Brick",
|
||||
7 => "Quartz",
|
||||
6 => "Quartz",
|
||||
);
|
||||
$this->name = "Double " . $names[$this->meta & 0x07] . " Slab";
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class FarmlandBlock extends SolidBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(FARMLAND, $meta, "Farmland");
|
||||
$this->hardness = 3;
|
||||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GlassBlock extends TransparentBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GLASS, 0, "Glass");
|
||||
$this->hardness = 1.5;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GlowstoneBlock extends TransparentBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GLOWSTONE_BLOCK, 0, "Glowstone");
|
||||
$this->hardness = 1.5;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GoldBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GOLD_BLOCK, 0, "Gold Block");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class GrassBlock extends SolidBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(GRASS, 0, "Grass");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 3;
|
||||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class GravelBlock extends FallableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(GRAVEL, 0, "Gravel");
|
||||
$this->hardness = 3;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class IceBlock extends TransparentBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(ICE, 0, "Ice");
|
||||
$this->hardness = 2.5;
|
||||
}
|
||||
|
||||
public function onBreak(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class IronBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(IRON_BLOCK, 0, "Iron Block");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class LapisBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(LAPIS_BLOCK, 0, "Lapis Block");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class LeavesBlock extends TransparentBlock{
|
|||
3 => "",
|
||||
);
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 1;
|
||||
}
|
||||
|
||||
private function findLog(Block $pos, array $visited, $distance, &$check, $fromSide = null){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class MelonBlock extends TransparentBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(MELON_BLOCK, 0, "Melon Block");
|
||||
$this->hardness = 5;
|
||||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class MossStoneBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(MOSS_STONE, 0, "Moss Stone");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class NetherBricksBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(NETHER_BRICKS, 0, "Nether Bricks");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class NetherrackBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(NETHERRACK, 0, "Netherrack");
|
||||
$this->hardness = 2;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
class ObsidianBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(OBSIDIAN, 0, "Obsidian");
|
||||
|
||||
$this->hardness = 6000;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class PlanksBlock extends SolidBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(PLANKS, $meta, "Wooden Planks");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class SandBlock extends FallableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(SAND, 0, "Sand");
|
||||
$this->hardness = 2.5;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -27,7 +27,8 @@ class SandstoneBlock extends SolidBlock{
|
|||
1 => "Chiseled Sandstone",
|
||||
2 => "Smooth Sandstone",
|
||||
);
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 4;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
class SnowBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(SNOW_BLOCK, 0, "Snow Block");
|
||||
$this->hardness = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class SoulSandBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(SOUL_SAND, 0, "Soul Sand");
|
||||
$this->hardness = 2.5;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
class StoneBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(STONE, 0, "Stone");
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class StoneBricksBlock extends SolidBlock{
|
|||
3 => "Chiseled Stone Bricks",
|
||||
);
|
||||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 30;
|
||||
}
|
||||
|
||||
public function getBreakTime(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class WoodBlock extends SolidBlock{
|
|||
);
|
||||
$this->meta &= 0x03;
|
||||
$this->name = $names[$this->meta];
|
||||
$this->hardness = 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -41,6 +41,7 @@ class WoolBlock extends SolidBlock{
|
|||
15 => "Black Wool",
|
||||
);
|
||||
$this->name = $names[$this->meta];
|
||||
$this->hardness = 4;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ class WorkbenchBlock extends SolidBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(WORKBENCH, $meta, "Crafting Table");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue