mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
AgricarnationCompatibility (#62)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
1 parent
903619e38c
commit
f323fe2ac0
1 file changed
+13
-1
+13
-1
@@ -64,7 +64,19 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || block instanceof BlockBush && !(block instanceof BlockCrops) && !(block instanceof BlockSapling))
|
||||
String[] names = {"tile.ImmersiveEngineering.hemp", "tile.natura.crops", "tile.witchery:mandrake", "tile.witchery:belladonna", "tile.witchery:artichoke", "tile.witchery:snowbell", "tile.witchery:wormwood", "tile.witchery:mindrake", "tile.witchery:wolfsbane", "tile.witchery:garlic"};
|
||||
boolean exit = false;
|
||||
if(block instanceof BlockBush ) {
|
||||
for(int a = 0; a < names.length; a++) {
|
||||
if(block.getUnlocalizedName().equals(names[a])) {
|
||||
exit = true;
|
||||
}
|
||||
}
|
||||
if(!(block instanceof BlockCrops) && !(block instanceof BlockSapling) && !exit) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2)
|
||||
return false;
|
||||
|
||||
Material mat = block.getMaterial();
|
||||
|
||||
Reference in new issue
Block a user