bsi might be old

This commit is contained in:
Leijurv 2019-01-30 11:42:46 -08:00
parent 06b3c5ddb5
commit 8947eff3b1
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -31,7 +31,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(ChunkRenderWorker.class) @Mixin(ChunkRenderWorker.class)
public abstract class MixinChunkRenderWorker { public abstract class MixinChunkRenderWorker {
@Shadow protected abstract boolean isChunkExisting(BlockPos pos, World worldIn); @Shadow
protected abstract boolean isChunkExisting(BlockPos pos, World worldIn);
@Redirect( @Redirect(
method = "processTask", method = "processTask",
@ -45,7 +46,7 @@ public abstract class MixinChunkRenderWorker {
Baritone baritone = (Baritone) BaritoneAPI.getProvider().getPrimaryBaritone(); Baritone baritone = (Baritone) BaritoneAPI.getProvider().getPrimaryBaritone();
IPlayerContext ctx = baritone.getPlayerContext(); IPlayerContext ctx = baritone.getPlayerContext();
if (ctx.player() != null && ctx.world() != null && baritone.bsi != null) { if (ctx.player() != null && ctx.world() != null && baritone.bsi != null) {
return baritone.bsi.isLoaded(pos.getX(), pos.getZ()); return baritone.bsi.isLoaded(pos.getX(), pos.getZ()) || this.isChunkExisting(pos, world);
} }
} }