Files
BloodMagic/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java
T
Nick a91d350037 Altar now accepts Chisel variants of given blocks
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.
2015-10-06 23:04:39 -07:00

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;
}
}