mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
#60 Fix crash when AE2 decorative quartz is disabled
This commit is contained in:
1 parent
67f1341ed4
commit
034d18f495
1 file changed
+13
-1
@@ -59,6 +59,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
public enum Features {
|
||||
|
||||
AE_CERTUS_QUARTZ("appliedenergistics2") {
|
||||
|
||||
private Block blockCheck;
|
||||
private boolean blockChecked;
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
@@ -67,6 +70,15 @@ public enum Features {
|
||||
Carving.chisel.addVariation("AECertusQuartz", GameRegistry.findBlock("appliedenergistics2", "tile.BlockQuartzChiseled"), 0, 2);
|
||||
Carving.chisel.registerOre("AECertusQuartz", "AECertusQuartz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enabled() {
|
||||
if (!blockChecked) {
|
||||
blockCheck = GameRegistry.findBlock("appliedenergistics2", "tile.BlockQuartz");
|
||||
blockChecked = true;
|
||||
}
|
||||
return super.enabled() && blockCheck != null;
|
||||
}
|
||||
},
|
||||
|
||||
AE_SKY_STONE("appliedenergistics2") {
|
||||
@@ -3069,7 +3081,7 @@ public enum Features {
|
||||
;
|
||||
}
|
||||
|
||||
public final boolean enabled() {
|
||||
public boolean enabled() {
|
||||
return Configurations.featureEnabled(this) && hasRequiredMod() && hasParentFeature();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user