Fixed initial runtime crashes in BetterEnd
This commit is contained in:
parent
defa88bbff
commit
f59cf8bad2
3 changed files with 10 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
package ru.betterend.interfaces;
|
||||
|
||||
public interface TargetChecker {
|
||||
boolean isTarget();
|
||||
boolean be_isTarget();
|
||||
}
|
||||
|
|
|
@ -31,25 +31,21 @@ public class NoiseChunkMixin implements TargetChecker {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isTarget() {
|
||||
public boolean be_isTarget() {
|
||||
return be_isEndGenerator;
|
||||
}
|
||||
|
||||
@Final
|
||||
@Shadow(aliases = "this$0")
|
||||
private NoiseChunk this$0;
|
||||
|
||||
@Shadow @Final private List<NoiseChunk.NoiseInterpolator> interpolators;
|
||||
|
||||
@Inject(method = "fillSlice", at = @At("HEAD"), cancellable = true)
|
||||
private void be_fillSlice(boolean primarySlice, int x, CallbackInfo info) {
|
||||
if (!TargetChecker.class.cast(this$0).isTarget()) {
|
||||
if (!TargetChecker.class.cast(this).be_isTarget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
info.cancel();
|
||||
|
||||
NoiseChunkAccessor accessor = NoiseChunkAccessor.class.cast(this$0);
|
||||
NoiseChunkAccessor accessor = NoiseChunkAccessor.class.cast(this);
|
||||
NoiseSettings noiseSettings = accessor.bnv_getNoiseSettings();
|
||||
|
||||
final int sizeY = noiseSettings.getCellHeight();
|
||||
|
|
|
@ -324,12 +324,13 @@ public class EndFeatures {
|
|||
BiomeAPI.addBiomeFeature(biome, THALLASIUM_ORE);
|
||||
BiomeAPI.addBiomeFeature(biome, ENDER_ORE);
|
||||
BiomeAPI.addBiomeFeature(biome, CRASHED_SHIP);
|
||||
|
||||
|
||||
BCLBiome bclbiome = BiomeAPI.getBiome(id);
|
||||
BCLFeature feature = getBiomeStructures(bclbiome);
|
||||
if (feature != null) {
|
||||
BiomeAPI.addBiomeFeature(biome, feature);
|
||||
}
|
||||
//TODO: 1.18.2 - Not sure what this code is supposed to do....
|
||||
// BCLFeature feature = getBiomeStructures(bclbiome);
|
||||
// if (feature != null) {
|
||||
// BiomeAPI.addBiomeFeature(biome, feature);
|
||||
// }
|
||||
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue