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
|
|
@ -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