Skip to content

Commit

Permalink
remove broken furry cringe
Browse files Browse the repository at this point in the history
  • Loading branch information
leijurv committed Aug 18, 2020
1 parent 0102ce8 commit 3b32c72
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 168 deletions.
67 changes: 0 additions & 67 deletions src/launch/java/baritone/launch/mixins/MixinBitArray.java

This file was deleted.

47 changes: 0 additions & 47 deletions src/launch/java/baritone/launch/mixins/MixinPalettedContainer.java

This file was deleted.

2 changes: 0 additions & 2 deletions src/launch/resources/mixins.baritone.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"maxShiftBy": 2
},
"client": [
"MixinBitArray",
"MixinChunkArray",
"MixinClientChunkProvider",
"MixinClientPlayerEntity",
Expand All @@ -21,7 +20,6 @@
"MixinLootContext",
"MixinMinecraft",
"MixinNetworkManager",
"MixinPalettedContainer",
"MixinPlayerController",
"MixinScreen",
"MixinWorldRenderer"
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/baritone/cache/WorldScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.BlockOptionalMetaLookup;
import baritone.api.utils.IPlayerContext;
import baritone.utils.accessor.IPalettedContainer;
import net.minecraft.block.BlockState;
import net.minecraft.client.multiplayer.ClientChunkProvider;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.palette.PalettedContainer;
import net.minecraft.world.chunk.AbstractChunkProvider;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkSection;
Expand Down Expand Up @@ -155,27 +155,27 @@ private boolean scanChunkInto(int chunkX, int chunkZ, Chunk chunk, BlockOptional
continue;
}
int yReal = y0 << 4;
IPalettedContainer bsc = (IPalettedContainer) section.getData();
// storageArray uses an optimized algorithm that's faster than getAt
// creating this array and then using getAtPalette is faster than even getFast(int index)
int[] storage = bsc.storageArray();
final int imax = 1 << 12;
for (int i = 0; i < imax; i++) {
BlockState state = bsc.getAtPalette(storage[i]);
if (state != null && filter.has(state)) {
int y = yReal | ((i >> 8) & 15);
if (result.size() >= max) {
if (Math.abs(y - playerY) < yLevelThreshold) {
foundWithinY = true;
} else {
if (foundWithinY) {
// have found within Y in this chunk, so don't need to consider outside Y
// TODO continue iteration to one more sorted Y coordinate block
return true;
PalettedContainer<BlockState> bsc = section.getData();
for (int yy = 0; yy < 16; yy++) {
for (int z = 0; z < 16; z++) {
for (int x = 0; x < 16; x++) {
BlockState state = bsc.get(x, yy, z);
if (filter.has(state)) {
int y = yReal | yy;
if (result.size() >= max) {
if (Math.abs(y - playerY) < yLevelThreshold) {
foundWithinY = true;
} else {
if (foundWithinY) {
// have found within Y in this chunk, so don't need to consider outside Y
// TODO continue iteration to one more sorted Y coordinate block
return true;
}
}
}
result.add(new BlockPos(chunkX | x, y, chunkZ | z));
}
}
result.add(new BlockPos(chunkX | (i & 15), y, chunkZ | ((i >> 4) & 15)));
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/baritone/utils/accessor/IBitArray.java

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/baritone/utils/accessor/IPalettedContainer.java

This file was deleted.

0 comments on commit 3b32c72

Please sign in to comment.