Skip to content

Commit

Permalink
AgricarnationCompatibility (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <dream-master@gmx.net>
  • Loading branch information
Fabboz and Dream-Master authored Dec 22, 2024
1 parent 903619e commit f323fe2
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,19 @@ public boolean acceptsRedstone() {

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();
Expand Down

0 comments on commit f323fe2

Please sign in to comment.