[Fix] Make sure we can fallback to a non-null NoneFeatureConfiguration (quiqueck/BetterNether#48)
This commit is contained in:
parent
928dff6270
commit
766319d877
1 changed files with 9 additions and 1 deletions
|
@ -665,7 +665,15 @@ public abstract class BCLFeatureBuilder<F extends Feature<FC>, FC extends Featur
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FC createConfiguration() {
|
public FC createConfiguration() {
|
||||||
if (configuration == null) return (FC) NoneFeatureConfiguration.NONE;
|
if (configuration == null) {
|
||||||
|
//Moonlight Lib seems to trigger a load of our data before
|
||||||
|
//NoneFeatureConfiguration.NONE is initialized. This Code
|
||||||
|
// is meant to prevent that...
|
||||||
|
if (NoneFeatureConfiguration.NONE != null)
|
||||||
|
return (FC) NoneFeatureConfiguration.NONE;
|
||||||
|
|
||||||
|
return (FC) NoneFeatureConfiguration.INSTANCE;
|
||||||
|
}
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue