diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 11e8d2bec..5ab3ba015 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1083,15 +1083,8 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade return false; } - if(($this->gamemode & 0x01) === ($gm & 0x01)){ - $this->gamemode = $gm; - }else{ - $this->gamemode = $gm; - $this->inventory->clearAll(); - $this->inventory->sendContents($this); - $this->inventory->sendContents($this->getViewers()); - $this->inventory->sendHeldItem($this->hasSpawned); - } + + $this->gamemode = $gm; $this->allowFlight = $this->isCreative(); @@ -1132,6 +1125,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade $this->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS)); } + $this->inventory->sendContents($this); + $this->inventory->sendContents($this->getViewers()); + $this->inventory->sendHeldItem($this->hasSpawned); + return true; } diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index 483c895f0..bf2ed20b6 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -159,6 +159,8 @@ class Block extends Position implements Metadatable{ const CAKE_BLOCK = 92; const TRAPDOOR = 96; + const WOODEN_TRAPDOOR = 96; + const WOOD_TRAPDOOR = 96; const STONE_BRICKS = 98; const STONE_BRICK = 98; diff --git a/src/pocketmine/block/BurningFurnace.php b/src/pocketmine/block/BurningFurnace.php index 95d8f7dcb..416c44005 100644 --- a/src/pocketmine/block/BurningFurnace.php +++ b/src/pocketmine/block/BurningFurnace.php @@ -116,23 +116,6 @@ class BurningFurnace extends Solid{ return true; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.7; - case 4: - return 0.9; - case 3: - return 1.35; - case 2: - return 0.45; - case 1: - return 2.65; - default: - return 17.5; - } - } - public function getDrops(Item $item){ $drops = []; if($item->isPickaxe() >= 1){ diff --git a/src/pocketmine/block/Cake.php b/src/pocketmine/block/Cake.php index 409eb3570..42ded7a0f 100644 --- a/src/pocketmine/block/Cake.php +++ b/src/pocketmine/block/Cake.php @@ -41,7 +41,7 @@ class Cake extends Transparent{ } public function getHardness(){ - return 2.5; + return 0.5; } public function getName(){ diff --git a/src/pocketmine/block/Carpet.php b/src/pocketmine/block/Carpet.php index 77b91b345..dc93a45c1 100644 --- a/src/pocketmine/block/Carpet.php +++ b/src/pocketmine/block/Carpet.php @@ -34,6 +34,10 @@ class Carpet extends Flowable{ $this->meta = $meta; } + public function getHardness(){ + return 0.1; + } + public function isSolid(){ return true; } diff --git a/src/pocketmine/block/Chest.php b/src/pocketmine/block/Chest.php index 91b52d9fe..01fac4452 100644 --- a/src/pocketmine/block/Chest.php +++ b/src/pocketmine/block/Chest.php @@ -45,7 +45,7 @@ class Chest extends Transparent{ } public function getHardness(){ - return 15; + return 2.5; } public function getName(){ diff --git a/src/pocketmine/block/Clay.php b/src/pocketmine/block/Clay.php index c25124249..54c777668 100644 --- a/src/pocketmine/block/Clay.php +++ b/src/pocketmine/block/Clay.php @@ -32,7 +32,7 @@ class Clay extends Solid{ } public function getHardness(){ - return 3; + return 0.6; } public function getName(){ diff --git a/src/pocketmine/block/Coal.php b/src/pocketmine/block/Coal.php index f00312788..86246fd16 100644 --- a/src/pocketmine/block/Coal.php +++ b/src/pocketmine/block/Coal.php @@ -32,30 +32,13 @@ class Coal extends Solid{ } public function getHardness(){ - return 30; + return 5; } public function getName(){ return "Coal Block"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - case 2: - return 0.65; - case 1: - return 3.75; - default: - return 25; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/CoalOre.php b/src/pocketmine/block/CoalOre.php index 59f7fa57e..7a9586c2e 100644 --- a/src/pocketmine/block/CoalOre.php +++ b/src/pocketmine/block/CoalOre.php @@ -32,30 +32,13 @@ class CoalOre extends Solid{ } public function getHardness(){ - return 15; + return 3; } public function getName(){ return "Coal Ore"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - case 3: - return 1.15; - case 2: - return 0.4; - case 1: - return 2.25; - default: - return 15; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/Cobblestone.php b/src/pocketmine/block/Cobblestone.php index 84895dc4d..0a41aa186 100644 --- a/src/pocketmine/block/Cobblestone.php +++ b/src/pocketmine/block/Cobblestone.php @@ -22,6 +22,7 @@ namespace pocketmine\block; use pocketmine\item\Item; +use pocketmine\item\Tool; class Cobblestone extends Solid{ @@ -31,29 +32,16 @@ class Cobblestone extends Solid{ } + public function getToolType(){ + return Tool::TYPE_PICKAXE; + } + public function getName(){ return "Cobblestone"; } public function getHardness(){ - return 30; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 10; - } + return 2; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/CobblestoneStairs.php b/src/pocketmine/block/CobblestoneStairs.php index a9e9f727c..afabf557b 100644 --- a/src/pocketmine/block/CobblestoneStairs.php +++ b/src/pocketmine/block/CobblestoneStairs.php @@ -30,6 +30,10 @@ class CobblestoneStairs extends Stair{ $this->meta = $meta; } + public function getHardness(){ + return 2; + } + public function getName(){ return "Cobblestone Stairs"; } diff --git a/src/pocketmine/block/Cobweb.php b/src/pocketmine/block/Cobweb.php index 7d0995a57..1f5ebc299 100644 --- a/src/pocketmine/block/Cobweb.php +++ b/src/pocketmine/block/Cobweb.php @@ -41,7 +41,7 @@ class Cobweb extends Flowable{ } public function getHardness(){ - return 25; + return 4; } public function onEntityCollide(Entity $entity){ diff --git a/src/pocketmine/block/Diamond.php b/src/pocketmine/block/Diamond.php index 2e15ebfae..0c574dcfa 100644 --- a/src/pocketmine/block/Diamond.php +++ b/src/pocketmine/block/Diamond.php @@ -32,24 +32,13 @@ class Diamond extends Solid{ } public function getHardness(){ - return 30; + return 5; } public function getName(){ return "Diamond Block"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - default: - return 25; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 4){ return [ diff --git a/src/pocketmine/block/DiamondOre.php b/src/pocketmine/block/DiamondOre.php index 66b560c4f..2c3a8dc01 100644 --- a/src/pocketmine/block/DiamondOre.php +++ b/src/pocketmine/block/DiamondOre.php @@ -32,24 +32,13 @@ class DiamondOre extends Solid{ } public function getHardness(){ - return 15; + return 3; } public function getName(){ return "Diamond Ore"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - default: - return 15; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 4){ return [ diff --git a/src/pocketmine/block/DoubleSlab.php b/src/pocketmine/block/DoubleSlab.php index 2f1558563..94a6b346a 100644 --- a/src/pocketmine/block/DoubleSlab.php +++ b/src/pocketmine/block/DoubleSlab.php @@ -32,7 +32,7 @@ class DoubleSlab extends Solid{ } public function getHardness(){ - return 30; + return 2; } public function getName(){ @@ -49,23 +49,6 @@ class DoubleSlab extends Solid{ return "Double " . $names[$this->meta & 0x07] . " Slab"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 10; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/DoubleWoodSlab.php b/src/pocketmine/block/DoubleWoodSlab.php index b9430e3eb..ec0c2a4a2 100644 --- a/src/pocketmine/block/DoubleWoodSlab.php +++ b/src/pocketmine/block/DoubleWoodSlab.php @@ -32,7 +32,7 @@ class DoubleWoodSlab extends Solid{ } public function getHardness(){ - return 15; + return 2; } public function getName(){ @@ -49,23 +49,6 @@ class DoubleWoodSlab extends Solid{ return "Double " . $names[$this->meta & 0x07] . " Wooden Slab"; } - public function getBreakTime(Item $item){ - switch($item->isAxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 3; - } - } - public function getDrops(Item $item){ return [ [Item::WOOD_SLAB, $this->meta & 0x07, 2], diff --git a/src/pocketmine/block/Emerald.php b/src/pocketmine/block/Emerald.php index 3d65a7292..6d4b0121c 100644 --- a/src/pocketmine/block/Emerald.php +++ b/src/pocketmine/block/Emerald.php @@ -32,24 +32,13 @@ class Emerald extends Solid{ } public function getHardness(){ - return 30; + return 5; } public function getName(){ return "Emerald Block"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - default: - return 25; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 4){ return [ diff --git a/src/pocketmine/block/EmeraldOre.php b/src/pocketmine/block/EmeraldOre.php index 7896c0c2d..367ddd2b1 100644 --- a/src/pocketmine/block/EmeraldOre.php +++ b/src/pocketmine/block/EmeraldOre.php @@ -36,18 +36,7 @@ class EmeraldOre extends Solid{ } public function getHardness(){ - return 15; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - default: - return 15; - } + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/EndPortalFrame.php b/src/pocketmine/block/EndPortalFrame.php index 158805196..c5ab69f27 100644 --- a/src/pocketmine/block/EndPortalFrame.php +++ b/src/pocketmine/block/EndPortalFrame.php @@ -41,6 +41,10 @@ class EndPortalFrame extends Solid{ } public function getHardness(){ + return -1; + } + + public function getResistance(){ return 18000000; } diff --git a/src/pocketmine/block/EndStone.php b/src/pocketmine/block/EndStone.php index ceef5a782..9fec1e4af 100644 --- a/src/pocketmine/block/EndStone.php +++ b/src/pocketmine/block/EndStone.php @@ -36,23 +36,6 @@ class EndStone extends Solid{ } public function getHardness(){ - return 45; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - case 3: - return 1.15; - case 2: - return 0.4; - case 1: - return 2.25; - default: - return 15; - } + return 3; } } \ No newline at end of file diff --git a/src/pocketmine/block/Farmland.php b/src/pocketmine/block/Farmland.php index 55bd5a611..ca19fbd42 100644 --- a/src/pocketmine/block/Farmland.php +++ b/src/pocketmine/block/Farmland.php @@ -37,7 +37,7 @@ class Farmland extends Solid{ } public function getHardness(){ - return 3; + return 0.6; } protected function recalculateBoundingBox(){ diff --git a/src/pocketmine/block/Fence.php b/src/pocketmine/block/Fence.php index 1b03c64ac..b8a5dbd1a 100644 --- a/src/pocketmine/block/Fence.php +++ b/src/pocketmine/block/Fence.php @@ -33,7 +33,7 @@ class Fence extends Transparent{ } public function getHardness(){ - return 15; + return 2; } diff --git a/src/pocketmine/block/FenceGate.php b/src/pocketmine/block/FenceGate.php index 918cdb4b8..a8899b764 100644 --- a/src/pocketmine/block/FenceGate.php +++ b/src/pocketmine/block/FenceGate.php @@ -38,7 +38,7 @@ class FenceGate extends Transparent{ } public function getHardness(){ - return 15; + return 2; } public function canBeActivated(){ diff --git a/src/pocketmine/block/Glass.php b/src/pocketmine/block/Glass.php index 8b5fba8eb..d1c68594e 100644 --- a/src/pocketmine/block/Glass.php +++ b/src/pocketmine/block/Glass.php @@ -36,7 +36,7 @@ class Glass extends Transparent{ } public function getHardness(){ - return 1.5; + return 0.3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/GlassPane.php b/src/pocketmine/block/GlassPane.php index a8953aa40..06b8e32d4 100644 --- a/src/pocketmine/block/GlassPane.php +++ b/src/pocketmine/block/GlassPane.php @@ -37,7 +37,7 @@ class GlassPane extends Thin{ } public function getHardness(){ - return 1.5; + return 0.3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/GlowingRedstoneOre.php b/src/pocketmine/block/GlowingRedstoneOre.php index 9c3ff2dfc..b4428c2ba 100644 --- a/src/pocketmine/block/GlowingRedstoneOre.php +++ b/src/pocketmine/block/GlowingRedstoneOre.php @@ -54,18 +54,6 @@ class GlowingRedstoneOre extends Solid{ return false; } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - default: - return 15; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 4){ return [ diff --git a/src/pocketmine/block/Glowstone.php b/src/pocketmine/block/Glowstone.php index d40403255..491d0e317 100644 --- a/src/pocketmine/block/Glowstone.php +++ b/src/pocketmine/block/Glowstone.php @@ -36,7 +36,7 @@ class Glowstone extends Transparent{ } public function getHardness(){ - return 1.5; + return 0.3; } public function getLightLevel(){ diff --git a/src/pocketmine/block/Gold.php b/src/pocketmine/block/Gold.php index 55df7b2bd..c35ce26ab 100644 --- a/src/pocketmine/block/Gold.php +++ b/src/pocketmine/block/Gold.php @@ -36,18 +36,7 @@ class Gold extends Solid{ } public function getHardness(){ - return 30; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - default: - return 15; - } + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/GoldOre.php b/src/pocketmine/block/GoldOre.php index 2ab095be4..f85f434c9 100644 --- a/src/pocketmine/block/GoldOre.php +++ b/src/pocketmine/block/GoldOre.php @@ -36,18 +36,7 @@ class GoldOre extends Solid{ } public function getHardness(){ - return 15; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - default: - return 15; - } + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/GrassPath.php b/src/pocketmine/block/GrassPath.php index 705e518a4..ede485b8e 100644 --- a/src/pocketmine/block/GrassPath.php +++ b/src/pocketmine/block/GrassPath.php @@ -55,7 +55,7 @@ class GrassPath extends Transparent{ } public function getHardness(){ - return 3; + return 0.6; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/Gravel.php b/src/pocketmine/block/Gravel.php index ddcdca2bc..e33383b8a 100644 --- a/src/pocketmine/block/Gravel.php +++ b/src/pocketmine/block/Gravel.php @@ -36,7 +36,7 @@ class Gravel extends Fallable{ } public function getHardness(){ - return 3; + return 0.6; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/HardenedClay.php b/src/pocketmine/block/HardenedClay.php index 786c2e6b0..3e8504337 100644 --- a/src/pocketmine/block/HardenedClay.php +++ b/src/pocketmine/block/HardenedClay.php @@ -36,24 +36,6 @@ class HardenedClay extends Solid{ } public function getHardness(){ - return 30; + return 1.25; } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.25; - case 4: - return 0.35; - case 3: - return 0.5; - case 2: - return 0.2; - case 1: - return 0.95; - default: - return 6.25; - } - } - } \ No newline at end of file diff --git a/src/pocketmine/block/HayBale.php b/src/pocketmine/block/HayBale.php index 1dcb64b7e..12066ff9a 100644 --- a/src/pocketmine/block/HayBale.php +++ b/src/pocketmine/block/HayBale.php @@ -37,7 +37,7 @@ class HayBale extends Solid{ } public function getHardness(){ - return 10; + return 0.5; } public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){ diff --git a/src/pocketmine/block/Ice.php b/src/pocketmine/block/Ice.php index fcc0a2ec4..dfe00942b 100644 --- a/src/pocketmine/block/Ice.php +++ b/src/pocketmine/block/Ice.php @@ -36,7 +36,7 @@ class Ice extends Transparent{ } public function getHardness(){ - return 2.5; + return 0.5; } public function onBreak(Item $item){ @@ -45,23 +45,6 @@ class Ice extends Transparent{ return true; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.1; - case 4: - return 0.15; - case 3: - return 0.2; - case 2: - return 0.1; - case 1: - return 0.4; - default: - return 0.75; - } - } - public function getDrops(Item $item){ return []; } diff --git a/src/pocketmine/block/Iron.php b/src/pocketmine/block/Iron.php index d25e7c44d..f8e557acb 100644 --- a/src/pocketmine/block/Iron.php +++ b/src/pocketmine/block/Iron.php @@ -36,20 +36,7 @@ class Iron extends Solid{ } public function getHardness(){ - return 30; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - default: - return 25; - } + return 5; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/IronBars.php b/src/pocketmine/block/IronBars.php index 7458ed582..ffca1b769 100644 --- a/src/pocketmine/block/IronBars.php +++ b/src/pocketmine/block/IronBars.php @@ -38,23 +38,6 @@ class IronBars extends Thin{ return 5; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - case 2: - return 0.65; - case 1: - return 3.75; - default: - return 5; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/IronDoor.php b/src/pocketmine/block/IronDoor.php index 8327f5205..6b74e29f0 100644 --- a/src/pocketmine/block/IronDoor.php +++ b/src/pocketmine/block/IronDoor.php @@ -36,24 +36,7 @@ class IronDoor extends Door{ } public function getHardness(){ - return 25; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - case 2: - return 0.65; - case 1: - return 3.75; - default: - return 25; - } + return 5; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/IronOre.php b/src/pocketmine/block/IronOre.php index 0d6873f8f..610a2c665 100644 --- a/src/pocketmine/block/IronOre.php +++ b/src/pocketmine/block/IronOre.php @@ -36,20 +36,7 @@ class IronOre extends Solid{ } public function getHardness(){ - return 15; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - case 3: - return 1.15; - default: - return 15; - } + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/Ladder.php b/src/pocketmine/block/Ladder.php index 02df5f485..59212ff24 100644 --- a/src/pocketmine/block/Ladder.php +++ b/src/pocketmine/block/Ladder.php @@ -48,7 +48,7 @@ class Ladder extends Transparent{ } public function getHardness(){ - return 2; + return 0.4; } public function onEntityCollide(Entity $entity){ diff --git a/src/pocketmine/block/Lapis.php b/src/pocketmine/block/Lapis.php index 6a8855672..a348f2522 100644 --- a/src/pocketmine/block/Lapis.php +++ b/src/pocketmine/block/Lapis.php @@ -32,24 +32,11 @@ class Lapis extends Solid{ } public function getName(){ - return "Lapis Block"; + return "Lapis Lazuli Block"; } public function getHardness(){ - return 15; - } - - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - case 3: - return 1.15; - default: - return 15; - } + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/LapisOre.php b/src/pocketmine/block/LapisOre.php index 7c21a19f2..629959c87 100644 --- a/src/pocketmine/block/LapisOre.php +++ b/src/pocketmine/block/LapisOre.php @@ -32,25 +32,11 @@ class LapisOre extends Solid{ } public function getHardness(){ - return 15; + return 3; } public function getName(){ - return "Lapis Ore"; - } - - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.6; - case 4: - return 0.75; - case 3: - return 1.15; - default: - return 15; - } + return "Lapis Lazuli Ore"; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/Lava.php b/src/pocketmine/block/Lava.php index e0d323df9..67260b195 100644 --- a/src/pocketmine/block/Lava.php +++ b/src/pocketmine/block/Lava.php @@ -46,10 +46,6 @@ class Lava extends Liquid{ return "Lava"; } - public function getHardness(){ - return 0; - } - public function onEntityCollide(Entity $entity){ $entity->fallDistance *= 0.5; if(!$entity->hasEffect(Effect::FIRE_RESISTANCE)){ diff --git a/src/pocketmine/block/Leaves.php b/src/pocketmine/block/Leaves.php index 34a12b4b8..ab863191f 100644 --- a/src/pocketmine/block/Leaves.php +++ b/src/pocketmine/block/Leaves.php @@ -42,7 +42,7 @@ class Leaves extends Transparent{ } public function getHardness(){ - return 1; + return 0.2; } public function getName(){ diff --git a/src/pocketmine/block/Liquid.php b/src/pocketmine/block/Liquid.php index e7c4e6410..22a8cced5 100644 --- a/src/pocketmine/block/Liquid.php +++ b/src/pocketmine/block/Liquid.php @@ -363,6 +363,10 @@ abstract class Liquid extends Transparent{ return $cost; } + public function getHardness(){ + return 100; + } + private function getOptimalFlowDirections(){ if($this->temporalVector === null){ $this->temporalVector = new Vector3(0, 0, 0); diff --git a/src/pocketmine/block/LitPumpkin.php b/src/pocketmine/block/LitPumpkin.php index b369e455d..6b4329ac6 100644 --- a/src/pocketmine/block/LitPumpkin.php +++ b/src/pocketmine/block/LitPumpkin.php @@ -33,7 +33,7 @@ class LitPumpkin extends Solid{ } public function getHardness(){ - return 5; + return 1; } public function getName(){ diff --git a/src/pocketmine/block/Melon.php b/src/pocketmine/block/Melon.php index 82736ac29..398346661 100644 --- a/src/pocketmine/block/Melon.php +++ b/src/pocketmine/block/Melon.php @@ -36,7 +36,7 @@ class Melon extends Transparent{ } public function getHardness(){ - return 5; + return 1; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/MonsterSpawner.php b/src/pocketmine/block/MonsterSpawner.php index 9a4d6dc7b..47a963581 100644 --- a/src/pocketmine/block/MonsterSpawner.php +++ b/src/pocketmine/block/MonsterSpawner.php @@ -32,30 +32,13 @@ class MonsterSpawner extends Solid{ } public function getHardness(){ - return 25; + return 5; } public function getName(){ return "Monster Spawner"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - case 2: - return 0.65; - case 1: - return 3.75; - default: - return 25; - } - } - public function getDrops(Item $item){ return []; } diff --git a/src/pocketmine/block/MossStone.php b/src/pocketmine/block/MossStone.php index f0304dc6c..f95fcbb73 100644 --- a/src/pocketmine/block/MossStone.php +++ b/src/pocketmine/block/MossStone.php @@ -36,25 +36,7 @@ class MossStone extends Solid{ } public function getHardness(){ - return 30; - } - - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 10; - } + return 2; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/Mycelium.php b/src/pocketmine/block/Mycelium.php index 7f261ddb7..4a91890e9 100644 --- a/src/pocketmine/block/Mycelium.php +++ b/src/pocketmine/block/Mycelium.php @@ -40,7 +40,7 @@ class Mycelium extends Solid{ } public function getHardness(){ - return 2.5; + return 0.6; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/NetherBrick.php b/src/pocketmine/block/NetherBrick.php index a2e1570f6..655be931a 100644 --- a/src/pocketmine/block/NetherBrick.php +++ b/src/pocketmine/block/NetherBrick.php @@ -36,25 +36,7 @@ class NetherBrick extends Solid{ } public function getHardness(){ - return 30; - } - - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 10; - } + return 2; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/NetherBrickStairs.php b/src/pocketmine/block/NetherBrickStairs.php index a90e427b9..26c4ee9e3 100644 --- a/src/pocketmine/block/NetherBrickStairs.php +++ b/src/pocketmine/block/NetherBrickStairs.php @@ -30,6 +30,10 @@ class NetherBrickStairs extends Stair{ return "Nether Bricks Stairs"; } + public function getHardness(){ + return 2; + } + public function __construct($meta = 0){ $this->meta = $meta; } diff --git a/src/pocketmine/block/Netherrack.php b/src/pocketmine/block/Netherrack.php index 6873f9336..ec31c4e57 100644 --- a/src/pocketmine/block/Netherrack.php +++ b/src/pocketmine/block/Netherrack.php @@ -39,24 +39,6 @@ class Netherrack extends Solid{ return 2; } - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.1; - case 4: - return 0.1; - case 3: - return 0.15; - case 2: - return 0.05; - case 1: - return 0.3; - default: - return 2; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/Obsidian.php b/src/pocketmine/block/Obsidian.php index f491405a3..11212e830 100644 --- a/src/pocketmine/block/Obsidian.php +++ b/src/pocketmine/block/Obsidian.php @@ -36,16 +36,7 @@ class Obsidian extends Solid{ } public function getHardness(){ - return 6000; - } - - public function getBreakTime(Item $item){ - - if($item->isPickaxe() >= 5){ - return 9.4; - }else{ - return 250; - } + return 50; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/Planks.php b/src/pocketmine/block/Planks.php index c15e1749c..5123b03a3 100644 --- a/src/pocketmine/block/Planks.php +++ b/src/pocketmine/block/Planks.php @@ -37,7 +37,7 @@ class Planks extends Solid{ } public function getHardness(){ - return 15; + return 2; } public function getName(){ diff --git a/src/pocketmine/block/Pumpkin.php b/src/pocketmine/block/Pumpkin.php index aa3768e57..02b30dae5 100644 --- a/src/pocketmine/block/Pumpkin.php +++ b/src/pocketmine/block/Pumpkin.php @@ -33,7 +33,7 @@ class Pumpkin extends Solid{ } public function getHardness(){ - return 5; + return 1; } public function getName(){ diff --git a/src/pocketmine/block/Quartz.php b/src/pocketmine/block/Quartz.php index be08b7200..fa4153965 100644 --- a/src/pocketmine/block/Quartz.php +++ b/src/pocketmine/block/Quartz.php @@ -31,6 +31,10 @@ class Quartz extends Solid{ $this->meta = $meta; } + public function getHardness(){ + return 0.8; + } + public function getName(){ static $names = [ 0 => "Quartz Block", @@ -41,24 +45,6 @@ class Quartz extends Solid{ return $names[$this->meta & 0x03]; } - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.15; - case 4: - return 0.2; - case 3: - return 0.3; - case 2: - return 0.1; - case 1: - return 0.6; - default: - return 4; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/QuartzStairs.php b/src/pocketmine/block/QuartzStairs.php index ede682d02..d55b6ee7d 100644 --- a/src/pocketmine/block/QuartzStairs.php +++ b/src/pocketmine/block/QuartzStairs.php @@ -30,6 +30,10 @@ class QuartzStairs extends Stair{ $this->meta = $meta; } + public function getHardness(){ + return 0.8; + } + public function getName(){ return "Quartz Stairs"; } diff --git a/src/pocketmine/block/Redstone.php b/src/pocketmine/block/Redstone.php index 499083d70..0f51131d8 100644 --- a/src/pocketmine/block/Redstone.php +++ b/src/pocketmine/block/Redstone.php @@ -32,30 +32,13 @@ class Redstone extends Transparent{ } public function getHardness(){ - return 30; + return 5; } public function getName(){ return "Redstone Block"; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.95; - case 4: - return 1.25; - case 3: - return 1.9; - case 2: - return 0.65; - case 1: - return 3.75; - default: - return 25; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/RedstoneOre.php b/src/pocketmine/block/RedstoneOre.php index 52bf8c0da..9a1c6ce98 100644 --- a/src/pocketmine/block/RedstoneOre.php +++ b/src/pocketmine/block/RedstoneOre.php @@ -37,12 +37,12 @@ class RedstoneOre extends Solid{ } public function getHardness(){ - return 15; + return 3; } public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_NORMAL or $type === Level::BLOCK_UPDATE_TOUCH){ - $this->getLevel()->setBlock($this, Block::get(Item::GLOWING_REDSTONE_ORE, $this->meta), false, false, true); + $this->getLevel()->setBlock($this, Block::get(Item::GLOWING_REDSTONE_ORE, $this->meta), false, true); return Level::BLOCK_UPDATE_WEAK; } diff --git a/src/pocketmine/block/Sand.php b/src/pocketmine/block/Sand.php index 1620f87dc..9fd9757e2 100644 --- a/src/pocketmine/block/Sand.php +++ b/src/pocketmine/block/Sand.php @@ -31,7 +31,7 @@ class Sand extends Fallable{ } public function getHardness(){ - return 2.5; + return 0.5; } public function getName(){ diff --git a/src/pocketmine/block/Sandstone.php b/src/pocketmine/block/Sandstone.php index b239a0b10..98c000e26 100644 --- a/src/pocketmine/block/Sandstone.php +++ b/src/pocketmine/block/Sandstone.php @@ -32,7 +32,7 @@ class Sandstone extends Solid{ } public function getHardness(){ - return 4; + return 0.8; } public function getName(){ @@ -45,24 +45,6 @@ class Sandstone extends Solid{ return $names[$this->meta & 0x03]; } - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.15; - case 4: - return 0.2; - case 3: - return 0.3; - case 2: - return 0.1; - case 1: - return 0.6; - default: - return 4; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/SandstoneStairs.php b/src/pocketmine/block/SandstoneStairs.php index 6b6f14016..6ddc59cb9 100644 --- a/src/pocketmine/block/SandstoneStairs.php +++ b/src/pocketmine/block/SandstoneStairs.php @@ -30,6 +30,10 @@ class SandstoneStairs extends Stair{ $this->meta = $meta; } + public function getHardness(){ + return 0.8; + } + public function getName(){ return "Sandstone Stairs"; } diff --git a/src/pocketmine/block/SignPost.php b/src/pocketmine/block/SignPost.php index 831b420bb..7bafd8711 100644 --- a/src/pocketmine/block/SignPost.php +++ b/src/pocketmine/block/SignPost.php @@ -34,7 +34,7 @@ class SignPost extends Transparent{ } public function getHardness(){ - return 5; + return 1; } public function isSolid(){ diff --git a/src/pocketmine/block/Slab.php b/src/pocketmine/block/Slab.php index fa8c0eb8e..e23a0d70a 100644 --- a/src/pocketmine/block/Slab.php +++ b/src/pocketmine/block/Slab.php @@ -34,7 +34,7 @@ class Slab extends Transparent{ } public function getHardness(){ - return 30; + return 2; } public function getName(){ @@ -123,24 +123,6 @@ class Slab extends Transparent{ return true; } - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 10; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/Snow.php b/src/pocketmine/block/Snow.php index 21f2c10dd..30ce81a92 100644 --- a/src/pocketmine/block/Snow.php +++ b/src/pocketmine/block/Snow.php @@ -31,7 +31,7 @@ class Snow extends Solid{ } public function getHardness(){ - return 1; + return 0.2; } public function getName(){ diff --git a/src/pocketmine/block/SnowLayer.php b/src/pocketmine/block/SnowLayer.php index ec1d20d60..86e4e8055 100644 --- a/src/pocketmine/block/SnowLayer.php +++ b/src/pocketmine/block/SnowLayer.php @@ -42,7 +42,7 @@ class SnowLayer extends Flowable{ } public function getHardness(){ - return 0.5; + return 0.1; } diff --git a/src/pocketmine/block/SoulSand.php b/src/pocketmine/block/SoulSand.php index ae76b0f8a..074b9b7ce 100644 --- a/src/pocketmine/block/SoulSand.php +++ b/src/pocketmine/block/SoulSand.php @@ -37,7 +37,7 @@ class SoulSand extends Solid{ } public function getHardness(){ - return 2.5; + return 0.5; } protected function recalculateBoundingBox(){ diff --git a/src/pocketmine/block/Sponge.php b/src/pocketmine/block/Sponge.php index 5c1d5afd6..fdb30eb43 100644 --- a/src/pocketmine/block/Sponge.php +++ b/src/pocketmine/block/Sponge.php @@ -31,7 +31,7 @@ class Sponge extends Solid{ } public function getHardness(){ - return 3; + return 0.6; } public function getName(){ diff --git a/src/pocketmine/block/StainedClay.php b/src/pocketmine/block/StainedClay.php index 773370f55..a0ceeb5e0 100644 --- a/src/pocketmine/block/StainedClay.php +++ b/src/pocketmine/block/StainedClay.php @@ -32,7 +32,7 @@ class StainedClay extends Solid{ } public function getHardness(){ - return 30; + return 1.25; } public function getName(){ @@ -57,21 +57,4 @@ class StainedClay extends Solid{ return $names[$this->meta & 0x0f]; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.25; - case 4: - return 0.35; - case 3: - return 0.5; - case 2: - return 0.2; - case 1: - return 0.95; - default: - return 6.25; - } - } - } \ No newline at end of file diff --git a/src/pocketmine/block/StillLava.php b/src/pocketmine/block/StillLava.php index 44ccd6b5f..c273860d4 100644 --- a/src/pocketmine/block/StillLava.php +++ b/src/pocketmine/block/StillLava.php @@ -29,8 +29,4 @@ class StillLava extends Lava{ return "Still Lava"; } - public function getHardness(){ - return 500; - } - } \ No newline at end of file diff --git a/src/pocketmine/block/Stone.php b/src/pocketmine/block/Stone.php index 06318de21..fd4786fc2 100644 --- a/src/pocketmine/block/Stone.php +++ b/src/pocketmine/block/Stone.php @@ -41,7 +41,11 @@ class Stone extends Solid{ } public function getHardness(){ - return 30; + return 1.5; + } + + public function getToolType(){ + return Tool::TYPE_PICKAXE; } public function getName(){ @@ -58,23 +62,6 @@ class Stone extends Solid{ return $names[$this->meta & 0x07]; } - public function getBreakTime(Item $item){ - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 7.5; - } - } - public function getDrops(Item $item){ if($item->isPickaxe() >= Tool::TIER_WOODEN){ return [ diff --git a/src/pocketmine/block/StoneBrickStairs.php b/src/pocketmine/block/StoneBrickStairs.php index 6f75bb69e..45af5d987 100644 --- a/src/pocketmine/block/StoneBrickStairs.php +++ b/src/pocketmine/block/StoneBrickStairs.php @@ -30,6 +30,10 @@ class StoneBrickStairs extends Stair{ $this->meta = $meta; } + public function getHardness(){ + return 1.5; + } + public function getName(){ return "Stone Brick Stairs"; } diff --git a/src/pocketmine/block/StoneBricks.php b/src/pocketmine/block/StoneBricks.php index b5cc72d6c..27296e077 100644 --- a/src/pocketmine/block/StoneBricks.php +++ b/src/pocketmine/block/StoneBricks.php @@ -32,7 +32,7 @@ class StoneBricks extends Solid{ } public function getHardness(){ - return 30; + return 1.5; } public function getName(){ @@ -44,25 +44,7 @@ class StoneBricks extends Solid{ ]; return $names[$this->meta & 0x03]; } - - public function getBreakTime(Item $item){ - - switch($item->isPickaxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 7.5; - } - } - + public function getDrops(Item $item){ if($item->isPickaxe() >= 1){ return [ diff --git a/src/pocketmine/block/StoneWall.php b/src/pocketmine/block/StoneWall.php index 26e12e65c..0e3fd79bf 100644 --- a/src/pocketmine/block/StoneWall.php +++ b/src/pocketmine/block/StoneWall.php @@ -38,7 +38,7 @@ class StoneWall extends Transparent{ } public function getHardness(){ - return 30; + return 2; } public function getName(){ @@ -83,4 +83,4 @@ class StoneWall extends Transparent{ return ($block->getId() !== self::COBBLE_WALL and $block->getId() !== self::FENCE_GATE) ? $block->isSolid() and !$block->isTransparent() : true; } -} \ No newline at end of file +} diff --git a/src/pocketmine/block/Trapdoor.php b/src/pocketmine/block/Trapdoor.php index 446d834b9..0158ade5d 100644 --- a/src/pocketmine/block/Trapdoor.php +++ b/src/pocketmine/block/Trapdoor.php @@ -34,11 +34,11 @@ class Trapdoor extends Transparent{ } public function getName(){ - return "Trapdoor"; + return "Wooden Trapdoor"; } public function getHardness(){ - return 15; + return 3; } public function canBeActivated(){ diff --git a/src/pocketmine/block/Vine.php b/src/pocketmine/block/Vine.php index 4ba8511af..e1a718a51 100644 --- a/src/pocketmine/block/Vine.php +++ b/src/pocketmine/block/Vine.php @@ -45,7 +45,7 @@ class Vine extends Transparent{ } public function getHardness(){ - return 1; + return 0.2; } public function canPassThrough(){ @@ -142,29 +142,6 @@ class Vine extends Transparent{ return false; } - public function getBreakTime(Item $item){ - if($item->isShears()){ - return 0.02; - }elseif($item->isSword()){ - return 0.2; - }elseif($item->isAxe()){ - switch($item->isAxe()){ - case Tool::TIER_WOODEN: - return 0.15; - case Tool::TIER_STONE: - return 0.075; - case Tool::TIER_IRON: - return 0.05; - case Tool::TIER_DIAMOND: - return 0.0375; - case Tool::TIER_GOLD: - return 0.025; - } - } - - return 0.3; - } - public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_NORMAL){ /*if($this->getSide(0)->getId() === self::AIR){ //Replace with common break method diff --git a/src/pocketmine/block/Water.php b/src/pocketmine/block/Water.php index 6aaad16ce..06801b8c7 100644 --- a/src/pocketmine/block/Water.php +++ b/src/pocketmine/block/Water.php @@ -37,10 +37,6 @@ class Water extends Liquid{ return "Water"; } - public function getHardness(){ - return 500; - } - public function onEntityCollide(Entity $entity){ $entity->resetFallDistance(); if($entity->fireTicks > 0){ diff --git a/src/pocketmine/block/Wood.php b/src/pocketmine/block/Wood.php index b10617d91..1374855c4 100644 --- a/src/pocketmine/block/Wood.php +++ b/src/pocketmine/block/Wood.php @@ -39,7 +39,7 @@ class Wood extends Solid{ } public function getHardness(){ - return 10; + return 2; } public function getName(){ diff --git a/src/pocketmine/block/WoodDoor.php b/src/pocketmine/block/WoodDoor.php index 292eed622..537aea9ed 100644 --- a/src/pocketmine/block/WoodDoor.php +++ b/src/pocketmine/block/WoodDoor.php @@ -40,7 +40,7 @@ class WoodDoor extends Door{ } public function getHardness(){ - return 15; + return 3; } public function getDrops(Item $item){ diff --git a/src/pocketmine/block/WoodSlab.php b/src/pocketmine/block/WoodSlab.php index 57d051ee6..3d36e16af 100644 --- a/src/pocketmine/block/WoodSlab.php +++ b/src/pocketmine/block/WoodSlab.php @@ -34,7 +34,7 @@ class WoodSlab extends Transparent{ } public function getHardness(){ - return 15; + return 2; } public function getName(){ @@ -122,24 +122,6 @@ class WoodSlab extends Transparent{ return true; } - public function getBreakTime(Item $item){ - - switch($item->isAxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 3; - } - } - public function getDrops(Item $item){ return [ [$this->id, $this->meta & 0x07, 1], diff --git a/src/pocketmine/block/WoodStairs.php b/src/pocketmine/block/WoodStairs.php index e641e9bdb..c100ed5c9 100644 --- a/src/pocketmine/block/WoodStairs.php +++ b/src/pocketmine/block/WoodStairs.php @@ -35,27 +35,13 @@ class WoodStairs extends Stair{ return "Wood Stairs"; } - public function getBreakTime(Item $item){ - - switch($item->isAxe()){ - case 5: - return 0.4; - case 4: - return 0.5; - case 3: - return 0.75; - case 2: - return 0.25; - case 1: - return 1.5; - default: - return 3; - } - } - public function getDrops(Item $item){ return [ [$this->id, 0, 1], ]; } + + public function getHardness(){ + return 2; + } } \ No newline at end of file diff --git a/src/pocketmine/block/Wool.php b/src/pocketmine/block/Wool.php index 3a90247cc..46ec8b58e 100644 --- a/src/pocketmine/block/Wool.php +++ b/src/pocketmine/block/Wool.php @@ -31,7 +31,7 @@ class Wool extends Solid{ } public function getHardness(){ - return 4; + return 0.8; } public function getName(){ diff --git a/src/pocketmine/block/Workbench.php b/src/pocketmine/block/Workbench.php index 13e409d1e..dfbc3d90d 100644 --- a/src/pocketmine/block/Workbench.php +++ b/src/pocketmine/block/Workbench.php @@ -38,7 +38,7 @@ class Workbench extends Solid{ } public function getHardness(){ - return 15; + return 2.5; } public function getName(){ diff --git a/src/pocketmine/level/Explosion.php b/src/pocketmine/level/Explosion.php index bf119e1e9..0cadd5ecc 100644 --- a/src/pocketmine/level/Explosion.php +++ b/src/pocketmine/level/Explosion.php @@ -110,7 +110,7 @@ class Explosion{ $block = $this->level->getBlock($vBlock); if($block->getId() !== 0){ - $blastForce -= ($block->getHardness() / 5 + 0.3) * $this->stepLen; + $blastForce -= ($block->getResistance() / 5 + 0.3) * $this->stepLen; if($blastForce > 0){ if(!isset($this->affectedBlocks[$index = Level::blockHash($block->x, $block->y, $block->z)])){ $this->affectedBlocks[$index] = $block; diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index b67b55db1..f1881148e 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1538,7 +1538,7 @@ class Level implements ChunkManager, Metadatable{ $drops[$k] = Item::get($i[0], $i[1], $i[2]); } } - + $above = $this->getBlock(new Vector3($target->x, $target->y + 1, $target->z)); if($above !== null){ if($above->getId() === Item::FIRE){ diff --git a/src/pocketmine/wizard/Installer.php b/src/pocketmine/wizard/Installer.php index b9c10cab3..99d42f05e 100644 --- a/src/pocketmine/wizard/Installer.php +++ b/src/pocketmine/wizard/Installer.php @@ -116,9 +116,9 @@ LICENSE; } }while($port <= 0 or $port > 65535); $config->set("server-port", $port); - echo "[*] " . $this->lang->ram_warning . "\n"; + /*echo "[*] " . $this->lang->ram_warning . "\n"; echo "[?] " . $this->lang->server_ram . " (" . self::DEFAULT_MEMORY . "): "; - $config->set("memory-limit", ((int) $this->getInput(self::DEFAULT_MEMORY)) . "M"); + $config->set("memory-limit", ((int) $this->getInput(self::DEFAULT_MEMORY)) . "M");*/ echo "[*] " . $this->lang->gamemode_info . "\n"; do{ echo "[?] " . $this->lang->default_gamemode . ": (" . self::DEFAULT_GAMEMODE . "): ";