use of gregtech.common.terminal.app.worldprospector.matcher.BlockStateMatcher in project GregTech by GregTechCEu.
the class WorldProspectorARApp method onAROpened.
@SideOnly(Side.CLIENT)
@Override
public void onAROpened() {
founds = new HashMap<>();
radius = 0;
maxRadius = getMaxRadius();
lastPos = null;
matchers = new HashSet<>();
for (Tuple<ItemStack, Integer> stack : getAllSlotStack()) {
if (stack.getFirst().getItem() instanceof ItemBlock) {
Block block = ((ItemBlock) stack.getFirst().getItem()).getBlock();
if (block != Blocks.AIR) {
matchers.add(new BlockStateMatcher(block.getStateFromMeta(stack.getFirst().getMetadata()), stack.getSecond()));
}
}
}
matchers.forEach(matcher -> founds.put(matcher, new HashMap<>()));
}
Aggregations