Added Single Explosions [ignite TNT using fling & steel]

This commit is contained in:
Shoghi Cervantes 2013-09-06 13:46:52 +02:00
parent 41b1a0f991
commit 94f8cfb59b
77 changed files with 134 additions and 32 deletions

View file

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

View file

@ -22,6 +22,7 @@
class BookshelfBlock extends SolidBlock{
public function __construct(){
parent::__construct(BOOKSHELF, 0, "Bookshelf");
$this->hardness = 7.5;
}
}

View file

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

View file

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

View file

@ -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();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -22,6 +22,7 @@
class PlanksBlock extends SolidBlock{
public function __construct($meta = 0){
parent::__construct(PLANKS, $meta, "Wooden Planks");
$this->hardness = 15;
}
}

View file

@ -22,6 +22,7 @@
class SandBlock extends FallableBlock{
public function __construct(){
parent::__construct(SAND, 0, "Sand");
$this->hardness = 2.5;
}
}

View file

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

View file

@ -22,6 +22,7 @@
class SnowBlock extends SolidBlock{
public function __construct(){
parent::__construct(SNOW_BLOCK, 0, "Snow Block");
$this->hardness = 1;
}
}

View file

@ -22,6 +22,7 @@
class SoulSandBlock extends SolidBlock{
public function __construct(){
parent::__construct(SOUL_SAND, 0, "Soul Sand");
$this->hardness = 2.5;
}
}

View file

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

View file

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

View file

@ -33,6 +33,7 @@ class WoodBlock extends SolidBlock{
);
$this->meta &= 0x03;
$this->name = $names[$this->meta];
$this->hardness = 10;
}
}

View file

@ -41,6 +41,7 @@ class WoolBlock extends SolidBlock{
15 => "Black Wool",
);
$this->name = $names[$this->meta];
$this->hardness = 4;
}
}

View file

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