Created
January 19, 2020 07:49
-
-
Save bvierra/ad86c2d1bc63c48cd18c9c1ca8971bac to your computer and use it in GitHub Desktop.
bleh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int WATER_CHECK_SIZE = 25; | |
int edgeSize = (int) Math.sqrt(WATER_CHECK_SIZE); | |
for (int x = 0; x < edgeSize; x++){ | |
for (int z = 0; z < edgeSize; z++){ | |
BlockPos waterCheckPos = getPos().down().add(x - edgeSize / 2, 0, z - edgeSize / 2); | |
if (world.getBlockState(waterCheckPos).getBlock() instanceof BlockLiquid && | |
world.getBlockState(waterCheckPos).getMaterial() == Material.WATER) { | |
waterCount++; | |
} | |
} | |
} | |
if (waterCount == WATER_CHECK_SIZE) { | |
// RUN HERE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment