Skip to content

Commit

Permalink
Merge pull request #24 from GameHerobrine/test
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
kotyaralih authored Jun 3, 2022
2 parents 26549f9 + 4c1773f commit fd99971
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/world/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ public function update(){
if($y < $this->fallY){
$d = $this->level->getBlock(new Vector3($x, $y + 1, $z));
$d2 = $this->level->getBlock(new Vector3($x, $y + 2, $z));
$blockToFallOn = $this->level->getBlock(new Vector3(floor($x), floor($y), floor($z)));
$dmg = ($this->fallY - $y) - 3;
if($blockToFallOn->getID() === FARMLAND){
$this->level->setBlockRaw($blockToFallOn,new DirtBlock());
}
if($dmg > 0 and !($d instanceof LiquidBlock) and $d->getID() !== LADDER and $d->getID() !== COBWEB and !($d2 instanceof LiquidBlock) and $d2->getID() !== LADDER and $d2->getID() !== COBWEB){
$this->harm($dmg, "fall");
}
Expand Down
25 changes: 16 additions & 9 deletions src/world/generator/object/NetherReactorStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class NetherReactorStructure{
"N N",
"N N",
"N N",
"N N",
"N N",
"N N",
"N ___ N",
"N ___ N",
"N ___ N",
"N N",
"N N",
"N N",
Expand All @@ -67,9 +67,9 @@ class NetherReactorStructure{
"N N",
"N N",
"N N",
"N N",
"N N",
"N N",
"N ___ N",
"N ___ N",
"N ___ N",
"N N",
"N N",
"N N",
Expand All @@ -87,9 +87,9 @@ class NetherReactorStructure{
"N N",
"N N",
"N N",
"N N",
"N N",
"N N",
"N ___ N",
"N ___ N",
"N ___ N",
"N N",
"N N",
"N N",
Expand Down Expand Up @@ -600,6 +600,13 @@ public static function buildReactor($level, $x, $y, $z){ /*use CENTER positions*
case "N": //Netherrack
$level->setBlockRaw(new Vector3($x - 8 + $offsetX, $y - 1 + $layerCount, $z - 8 + $offsetZ), new NetherrackBlock());
break;
case " ":
$block = $level->getBlock(new Vector3($x - 8 + $offsetX, $y - 1 + $layerCount, $z - 8 + $offsetZ))->getID();
if($block == 0){
continue;
}
$level->setBlockRaw(new Vector3($x - 8 + $offsetX, $y - 1 + $layerCount, $z - 8 + $offsetZ), new AirBlock());
break;
}
++$offsetX;
}
Expand Down

0 comments on commit fd99971

Please sign in to comment.