mirror of
https://github.com/GTNewHorizons/WailaHarvestability.git
synced 2026-11-25 06:14:34 +00:00
26 lines
561 B
Java
26 lines
561 B
Java
package squeek.wailaharvestability.helpers;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
public class BlockHelper
|
|
{
|
|
|
|
public static boolean getHarvestLevelsOf(Block block, int metadata, String[] toolClasses, int[] harvestLevels)
|
|
{
|
|
int i = 0;
|
|
boolean hasEffectiveTools = false;
|
|
for (String toolClass : toolClasses)
|
|
{
|
|
harvestLevels[i] = MinecraftForge.getBlockHarvestLevel(block, metadata, toolClass);
|
|
|
|
if (harvestLevels[i] != -1)
|
|
hasEffectiveTools = true;
|
|
|
|
i++;
|
|
}
|
|
return hasEffectiveTools;
|
|
}
|
|
|
|
}
|