File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/main/java/br/minilambda/event Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,7 @@ public void onWaterFlow(BlockFromToEvent event) {
6868 }
6969
7070 // Getting bottom block.
71- Block bottomBlock = toBlock .getWorld ().getBlockAt (
72- toBlock .getX (),
73- toBlock .getY () - 1 ,
74- toBlock .getZ ()
75- );
71+ Block bottomBlock = toBlock .getRelative (0 , -1 , 0 );
7672
7773 // Exit if bottom block is different of dirt.
7874 if (bottomBlock .getType () != Material .DIRT ){
@@ -97,11 +93,7 @@ public void onBlockPlaceUnderWater(BlockPlaceEvent event){
9793 }
9894
9995 // Getting top block.
100- Block topBlock = block .getWorld ().getBlockAt (
101- block .getX (),
102- block .getY () + 1 ,
103- block .getZ ()
104- );
96+ Block topBlock = block .getRelative (0 , 1 , 0 );
10597
10698 // Exit if top block is water.
10799 if (topBlock .getType () != Material .WATER ){
You can’t perform that action at this time.
0 commit comments