mirror of https://github.com/cabaletta/baritone
working for realsies
This commit is contained in:
parent
9f951f261d
commit
36315c5151
|
@ -17,6 +17,7 @@
|
|||
|
||||
package baritone.api.utils;
|
||||
|
||||
import net.minecraft.block.AirBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
@ -54,7 +55,9 @@ public class BlockUtils {
|
|||
return null; // cached as null
|
||||
}
|
||||
block = Registry.BLOCK.getOrDefault(ResourceLocation.tryCreate(name.contains(":") ? name : "minecraft:" + name));
|
||||
// TODO this again returns air instead of null!
|
||||
if (block instanceof AirBlock && !name.equals("air")) {
|
||||
block = null;
|
||||
}
|
||||
Map<String, Block> copy = new HashMap<>(resourceCache); // read only copy is safe, wont throw concurrentmodification
|
||||
copy.put(name, block);
|
||||
resourceCache = copy;
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
|||
private int tickCount;
|
||||
|
||||
private static LootTableManager manager;
|
||||
private static Map<Block, List<Item>> drops;
|
||||
private static Map<Block, List<Item>> drops = new HashMap<>();
|
||||
|
||||
public MineProcess(Baritone baritone) {
|
||||
super(baritone);
|
||||
|
|
Loading…
Reference in New Issue