diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index 4959cf809..6136e8a5c 100644 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -58,10 +58,10 @@ class BlockAPI{ PLANKS => "PlanksBlock", SAPLING => "SaplingBlock", BEDROCK => "BedrockBlock", - /*WATER => (new GenericBlock(WATER, 0, "")), - STILL_WATER => (new GenericBlock(STILL_WATER, 0, "")), - LAVA => (new GenericBlock(LAVA, 0, "")), - STILL_LAVA => (new GenericBlock(STILL_LAVA, 0, "")),*/ + WATER => "WaterBlock", + STILL_WATER => "StillWaterBlock", + LAVA => "LavaBlock", + STILL_LAVA => "StillLavaBlock", SAND => "SandBlock", GRAVEL => "GravelBlock", GOLD_ORE => "GoldOreBlock", diff --git a/src/classes/material/Block.php b/src/classes/material/Block.php index 8cd91f93c..b33ab8b9f 100644 --- a/src/classes/material/Block.php +++ b/src/classes/material/Block.php @@ -40,6 +40,7 @@ abstract class Block{ public $isPlaceable = true; public $inWorld = false; public $hasPhysics = false; + public $isLiquid = false; public $v = false; public function __construct($id, $meta = 0, $name = "Unknown"){ @@ -63,7 +64,7 @@ abstract class Block{ final public function position(Vector3 $v){ $this->inWorld = true; - $this->position = new Vector3((int) $v->x, (int) $v->y, (int) $v->z); + $this->v = new Vector3((int) $v->x, (int) $v->y, (int) $v->z); } public function getDrops(Item $item, Player $player){ diff --git a/src/classes/material/block/LiquidBlock.php b/src/classes/material/block/LiquidBlock.php new file mode 100644 index 000000000..14529b2ae --- /dev/null +++ b/src/classes/material/block/LiquidBlock.php @@ -0,0 +1,33 @@ +isLiquid = true; + } +} \ No newline at end of file diff --git a/src/classes/material/block/liquid/Lava.php b/src/classes/material/block/liquid/Lava.php new file mode 100644 index 000000000..0116d8b57 --- /dev/null +++ b/src/classes/material/block/liquid/Lava.php @@ -0,0 +1,33 @@ +