public class XRay extends Module {
private final ArrayList<BlockPos> ores = new ArrayList<>();
@EventHandler
public void onPacket(PacketEvent e) {
if (e.getPacket() instanceof SMultiBlockChangePacket packet) {
packet.func_244310_a((blockPos, blockState) -> {
BlockPos bp = blockPos().add(0,0,0);
if (blockState.getBlock().equals(Blocks.ANCIENT_DEBRIS) && !ores.contains(bp) {
ores.add(bp);
}
});
}
}
@EventHandler
public void onRender3D(Render3DLastEvent e) {
for (BlockPos pos : ores) {
if (mc.world.getBlockState(pos).getBlock().equals(Blocks.ANCIENT_DEBRIS)) {
// Рендер блока
} else {
ores.remove(pos);
break;
}
}
}
}