mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-21 20:42:28 +00:00
Will require a re-setup of the workspace (`gradlew [eclipse|idea]`) in order to download the Chisel API. This launches just fine without Chisel installed.
27 lines
891 B
Java
27 lines
891 B
Java
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
|
|
|
import WayofTime.alchemicalWizardry.api.BlockStack;
|
|
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
|
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
|
import com.google.common.base.Strings;
|
|
|
|
public class CompatChecks {
|
|
|
|
public static boolean checkChiselBlock(BlockStack blockStack, String groupName) {
|
|
if (blockStack.getBlock() == null)
|
|
return false;
|
|
|
|
ICarvingGroup group = CarvingUtils.getChiselRegistry().getGroup(blockStack.getBlock(), blockStack.getMeta());
|
|
if (group != null) {
|
|
String check = CarvingUtils.getChiselRegistry().getGroup(blockStack.getBlock(), blockStack.getMeta()).getName();
|
|
|
|
if (Strings.isNullOrEmpty(check))
|
|
return false;
|
|
|
|
return check.equals(groupName);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|