mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 13:30:08 +00:00
Hydrology fixes
This commit is contained in:
1 parent
577f924133
commit
bf12f30d26
168 files changed
+13544
-582
No files matched your search
@@ -510,6 +510,15 @@ public final class ModdedBlockResolution {
|
||||
}
|
||||
|
||||
public static boolean canPlaceOnto(Block mat, Block onto) {
|
||||
if (mat == Blocks.SUGAR_CANE) {
|
||||
return onto == Blocks.SUGAR_CANE || onto == Blocks.GRASS_BLOCK || onto == Blocks.DIRT
|
||||
|| onto == Blocks.COARSE_DIRT || onto == Blocks.PODZOL || onto == Blocks.MYCELIUM
|
||||
|| onto == Blocks.ROOTED_DIRT
|
||||
|| onto == Blocks.MOSS_BLOCK || onto == Blocks.PALE_MOSS_BLOCK || onto == Blocks.MUD
|
||||
|| onto == Blocks.MUDDY_MANGROVE_ROOTS || onto == Blocks.SAND || onto == Blocks.RED_SAND
|
||||
|| onto == Blocks.SUSPICIOUS_SAND;
|
||||
}
|
||||
|
||||
if (mat == Blocks.CACTUS) {
|
||||
return onto == Blocks.CACTUS || onto == Blocks.SAND || onto == Blocks.RED_SAND;
|
||||
}
|
||||
|
||||
+13
@@ -69,6 +69,19 @@ public class ModdedBlockResolutionContractTest {
|
||||
assertTrue(ModdedBlockResolution.isDecorant(Blocks.CACTUS.defaultBlockState()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sugarCanePlacementRequiresNativeSubstrate() {
|
||||
for (Block block : new Block[]{Blocks.SUGAR_CANE, Blocks.GRASS_BLOCK, Blocks.DIRT, Blocks.COARSE_DIRT,
|
||||
Blocks.PODZOL, Blocks.MYCELIUM, Blocks.ROOTED_DIRT, Blocks.MOSS_BLOCK, Blocks.PALE_MOSS_BLOCK,
|
||||
Blocks.MUD, Blocks.MUDDY_MANGROVE_ROOTS, Blocks.SAND, Blocks.RED_SAND, Blocks.SUSPICIOUS_SAND}) {
|
||||
assertTrue(block.toString(), ModdedBlockResolution.canPlaceOnto(Blocks.SUGAR_CANE, block));
|
||||
}
|
||||
for (Block block : new Block[]{Blocks.STONE, Blocks.GRAVEL, Blocks.CLAY, Blocks.DIRT_PATH,
|
||||
Blocks.FARMLAND, Blocks.AIR, Blocks.WATER}) {
|
||||
assertFalse(block.toString(), ModdedBlockResolution.canPlaceOnto(Blocks.SUGAR_CANE, block));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sulfurAndDripstoneTipsReceivePostLoadUpdates() {
|
||||
for (Block block : new Block[]{Blocks.SULFUR_SPIKE, Blocks.POINTED_DRIPSTONE}) {
|
||||
|
||||
Reference in new issue
Block a user